Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Hide/Show
-----Original Message----- Greetings, I would like button that the first time its clicked, will hide columns C:G and when clicked the next time will show the same columns. I can write the code to separately hide or show but I dont know how to combine them to toggle when the button is clicked. All help is greatly appreciated! Alan . Alan This will do. Right click the sheet tab and select View Code. Paste the following macro then assign it to a button. Sub ToggleHidden() Dim rng As Range Set rng = Range(Cells(1, 3), Cells(1, 7)) rng.EntireColumn.Hidden = rng.EntireColumn.Hidden = False End Sub Regards Peter |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Toggle show / hide group outline symbols with shortcut | Excel Discussion (Misc queries) | |||
Hide data series in chart - toggle on and off | Charts and Charting in Excel | |||
How DO I get the bold face toggle to show | New Users to Excel | |||
using a toggle button to show or hide information in several cells | Excel Worksheet Functions | |||
Toggle Hide/Show | Excel Programming |