ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA toolbar-button programming switch on/off (https://www.excelbanter.com/excel-programming/358055-vba-toolbar-button-programming-switch-off.html)

Snoopy[_2_]

VBA toolbar-button programming switch on/off
 
Hey guys
I'm designing this toolbar-button that do some shows/hide-stuff.
So far, my knowlegde of VBA is so limited, that I have used 2 buttons
(imagine that!) - 1 for "show" and 1 for "hide".

I know there is some of You guys out there, smiling and realy enjoying
Your cigars of wisdom - while considering whether to help me or not
(You see?
"Hide" and "Show" again!).
Somehow I just can feel that an answer from outer VBA-space will turn
up through the smoke in any minute - and I will be happyly greatful!


Regards
Snoopy


:)


Norman Jones

VBA toolbar-button programming switch on/off
 
Hi Snoopy,

Try something like:

'=============
Private Sub CommandButton1_Click()
Columns(1).Hidden = Not Columns(1).Hidden
End Sub
'<<=============


---
Regards,
Norman



"Snoopy" wrote in message
oups.com...
Hey guys
I'm designing this toolbar-button that do some shows/hide-stuff.
So far, my knowlegde of VBA is so limited, that I have used 2 buttons
(imagine that!) - 1 for "show" and 1 for "hide".

I know there is some of You guys out there, smiling and realy enjoying
Your cigars of wisdom - while considering whether to help me or not
(You see?
"Hide" and "Show" again!).
Somehow I just can feel that an answer from outer VBA-space will turn
up through the smoke in any minute - and I will be happyly greatful!


Regards
Snoopy


:)




Snoopy[_2_]

VBA toolbar-button programming switch on/off
 
Thanks :)

I think You just solved my problem :)))



All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com