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
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

bobsan42

Well-known Member
Joined
Jul 14, 2010
Messages
1,855
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
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"
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,699
Messages
5,833,206
Members
430,196
Latest member
rez5656

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top