View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default vb code to hide columns

Columns("F:K").Hidden = false
and
Columns("F:K").Hidden = True

and try this which will hide if visible and unhide if hidden
Columns("F:K").Hidden = not Columns("F:K").Hidden


If this post helps click Yes
---------------
Jacob Skaria


"pm tlb" wrote:

I have a spreadsheet that multiple people view. I need a macro to hide the
columns that some don't need to see and another macro to unhide the columns.
the macro I created hides columns B-M and I need it to hide F-K. The VB code
currently is

Columns("F:K").Select
Selection.EntireColumn.Hidden = True
End Sub