Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default vb code to hide columns

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default vb code to hide columns

Surely, you can figure out how to make the change. Or, is there more to your
question?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"pm tlb" <pm
wrote in message
...
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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default vb code to hide columns

Got it, worked like a charm,Thank you!

"Don Guillett" wrote:

Surely, you can figure out how to make the change. Or, is there more to your
question?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"pm tlb" <pm
wrote in message
...
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



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default vb code to hide columns

Cheers..

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


"pm tlb" wrote:

Got it, worked like a charm,Thank you!

"Don Guillett" wrote:

Surely, you can figure out how to make the change. Or, is there more to your
question?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"pm tlb" <pm
wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to Hide columns in spreadsheet but NOT hide data in chart. KrispyData Charts and Charting in Excel 1 March 20th 09 04:45 PM
Hide Code Stockwell43 Excel Discussion (Misc queries) 3 January 12th 09 07:05 PM
Hide columns code jlclyde Excel Discussion (Misc queries) 0 April 25th 08 03:17 PM
hide code does not hide Wanna Learn Excel Discussion (Misc queries) 2 March 6th 08 07:21 PM
Hide VBA code help GerryK Excel Worksheet Functions 3 May 30th 07 09:47 PM


All times are GMT +1. The time now is 09:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"