Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide & unhide toggle button
Private Sub CommandButton1_Click()
Dim myRow As Long Dim myAdr As String myRow = ActiveCell.Row myAdr = ActiveCell.Offset(0, -1).Address(0, 0) Range("B" & myRow & ":" & myAdr).EntireColumn.Hidden = True The macro above will hide COL B to any selected col What can I add to thsi macro in order to toggle between hiding and unhiding that data. Much appreciate your help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide & unhide toggle button
Hello,
I'd try just one small change to the line below: Range("B" & myRow & ":" & myAdr).EntireColumn.Hidden = Not Columns("B").Hidden |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide & unhide toggle button
On Wednesday, October 31, 2012 3:26:28 PM UTC-4, wrote:
Private Sub CommandButton1_Click() Dim myRow As Long Dim myAdr As String myRow = ActiveCell.Row myAdr = ActiveCell.Offset(0, -1).Address(0, 0) Range("B" & myRow & ":" & myAdr).EntireColumn.Hidden = True The macro above will hide COL B to any selected col What can I add to thsi macro in order to toggle between hiding and unhiding that data. Much appreciate your help |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide & unhide toggle button
On Wednesday, October 31, 2012 3:26:28 PM UTC-4, wrote:
Private Sub CommandButton1_Click() Dim myRow As Long Dim myAdr As String myRow = ActiveCell.Row myAdr = ActiveCell.Offset(0, -1).Address(0, 0) Range("B" & myRow & ":" & myAdr).EntireColumn.Hidden = True The macro above will hide COL B to any selected col What can I add to thsi macro in order to toggle between hiding and unhiding that data. Much appreciate your help Worked great Tank you very much |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide/Unhide Toggle | Excel Programming | |||
Toggle Button in Ribbon to Hide/Show Built-in Tabs | Excel Programming | |||
using a toggle button to show or hide information in several cells | Excel Worksheet Functions | |||
HOW CAN I HAVE THE SHEET TO BE PROTECTED, FORMULAS HIDDEN AND YET GIVE AN OPTION IN VB TO HAVE A TOGGLE TO PROTECT/ UNPROTECT/HIDE/UNHIDE CELLS | Excel Programming | |||
Syntax of hide/unhide personal.xls toggle | Excel Programming |