Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about using just one macro to do both. If hidden...make visible and if
visible hide Sub View_Onscreen3() Columns("E:E").Hidden = Not Columns("E:E").Hidden Columns("S:V").Hidden = Not Columns("S:V").Hidden Columns("X:Z").Hidden = Not Columns("X:Z").Hidden Columns("AB:AB").Hidden = Not Columns("AB:AB").Hidden Columns("AI:AI").Hidden = Not Columns("AI:AI").Hidden End Sub If this post helps click Yes --------------- Jacob Skaria "Kevin K" wrote: I've tried modifying the code below to hide/unhide the columns below, but can't get this to work. It either hide/unhides columns not specified below or it will only run the first line. I don't really know VBA, but am just trying to record macros and modify them. Please help if you have any ideas. Thanks! Sub View_Onscreen3() ' View_Onscreen Macro Columns("E:E").Hidden = True Columns("S:V").Hidden = True Columns("X:Z").Hidden = True Columns("AB:AB").Hidden = True Columns("AI:AI").Hidden = True Range("Q16").Select End Sub Sub View_Print3() ' View_Onscreen Macro Columns("E:E").Hidden = False Columns("S:V").Hidden = False Columns("X:Z").Hidden = False Columns("AB:AB").Hidden = False Columns("AI:AI").Hidden = False Range("Q16").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto Hide-Unhide Columns with a macro | Excel Discussion (Misc queries) | |||
I set up a macro to hide/unhide columns. It hides more columns | Excel Programming | |||
macro to hide/unhide columns | Excel Programming | |||
How do I hide or unhide zero value columns/rows USING A MACRO? | Excel Discussion (Misc queries) | |||
Macro to hide or unhide columns | Excel Programming |