Default a Command Button to invisible until it is made visible by another program

GatesNJ

New Member
Joined
Sep 22, 2014
Messages
1
Hi All - I'm relatively new to VBA, but seem to be a relatively quick study. I have a very complicated tool that I would like to add some dependent functionality to. I have a reporting tool that is linked to another "calculation" tool on a shared drive. I already have functionality that retrieves the calculation tool and saves it to an individual's computer with a specified file name. In the case where a user wants to make changes to the calculation settings/parameters of his/her personal file, I would like to make another macro that finds the saved file on the computer and works from that. Therefore, I would like my button to be invisible by default until certain conditions are met that are specified in the pre-requisite macro. I know to make it visible again is just 'CommandButton1.visible', but I don't know how to set it to an invisible default. Any help would be appreciated. Thanks
 

Some videos you may like

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

bobsan42

Well-known Member
Joined
Jul 14, 2010
Messages
1,343
set it's VBE "Visible" property to False
Or
make it invisible during the starting/ loading/ opening event of the form or workbook that contains the button "CommandButton1.visible = False"
 

Watch MrExcel Video

Forum statistics

Threads
1,108,509
Messages
5,523,312
Members
409,511
Latest member
hitesh222002

This Week's Hot Topics

Top