excel vba


starstarstarstarstar Excellent

  • Home
  • Courses
  • Promotions
  • Schedule
  • Formats
  • Our Clients

Forum home » Delegate support and help forum » Microsoft VBA Training and help » Excel VBA

Excel VBA

resolvedResolved · High Priority · Version 2007

Cyrus has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

Excel VBA

Hi, could anyone help me with VBA code for hiding columns in a workbook with 10 various worksheet?

For example, sheet 1, hide column G:G, K:K, & M:M
Sheet 2 hide column B:B, F:F, H:H

and the columns varies per each worksheet.

The purpose is to have a printable with with the remaining data.


RE: Excel VBA

Hi Cyrus, thanks for your query. It's going to look a lot like this:

Selection.EntireColumn.Hidden = True

...for each sheet you need.

Hope this helps,


Fri 2 Mar 2012: Automatically marked as resolved.


VBA tip:

Use GoTo to Select A Cell With VBA

To select a certain cell on a Worksheet you can use:

Application.Goto Reference:=Range("V300")

or more simply


If, on the other hand, you want the selected cell to be the top/left cell on the screen you use:

Application.Goto Reference:=Range("V300"), Scroll=True

View all VBA hints and tips

Server loaded in 0.11 secs.