The Animal
Active Member
- Joined
- May 26, 2011
- Messages
- 449
Hi
I have just created my first VBA to Hide and Un-hide columns as below in 2010
Sub ToggleExpandContract()
Range("A:C,F:F,H:J,X:X,Y:Y,AH:AJ").Columns.Hidden = Not Range("A:C,F:F,H:J,X:X,Y:Y,AH:AJ").Columns.Hidden
End Sub
Then I created a button and added it to my Quick Access Toolbar but the button keeps disappearing when I close the file and re-open the file so I have to keep re-creating the button.
What am I doing wrong?
Thanks
I have just created my first VBA to Hide and Un-hide columns as below in 2010
Sub ToggleExpandContract()
Range("A:C,F:F,H:J,X:X,Y:Y,AH:AJ").Columns.Hidden = Not Range("A:C,F:F,H:J,X:X,Y:Y,AH:AJ").Columns.Hidden
End Sub
Then I created a button and added it to my Quick Access Toolbar but the button keeps disappearing when I close the file and re-open the file so I have to keep re-creating the button.
What am I doing wrong?
Thanks