LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default hide column

Try this:

Dim i As Integer, ws as worksheet
For Each ws in ActiveWorkbook.Worksheets
For i = 1 To 255
If ws.Cells(3, i).Value = 1 Then
ws.Columns(i).Hidden = True
End If
Next
Next


Steph wrote:

Hi. Is there a way to have vba scan every visible worksheet, and look in
row 3. If there is a 1 in a cell in row 3, hide that column? Thanks!


 
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
Hide Column If Usedrange of Column ISBLANK Follow-up [email protected] Excel Discussion (Misc queries) 1 April 12th 09 10:00 PM
Hide Column If Usedrange of Column ISBLANK [email protected] Excel Discussion (Misc queries) 4 April 12th 09 09:47 PM
How to hide a column Pascale Excel Discussion (Misc queries) 4 February 27th 08 05:31 PM
Hide column or row based on a cell in the column or row? SacGuy Excel Discussion (Misc queries) 0 January 24th 06 06:51 PM
How to hide a column when value=1 angeloso Excel Programming 2 October 25th 05 12:08 PM


All times are GMT +1. The time now is 06:36 AM.

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

About Us

"It's about Microsoft Excel"