ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   make button invisible if macros disabled (https://www.excelbanter.com/excel-discussion-misc-queries/167879-make-button-invisible-if-macros-disabled.html)

Horatio J. Bilge, Jr.

make button invisible if macros disabled
 
I have a worksheet with a button on it. Clicking on the button displays a
series of userforms. I have a Workbook_BeforePrint sub that makes the
button's visible property false, so it doesn't print.

I want the button to be invisible if a user opens the file without macros. I
have tried:
1) making the button invisible, and then using the workbook_open sub to
make it visible if macros are enabled. It was still visible without macros
2) Using a cell on the worksheet as a sort of button, and used colors and
borders to make it only appear if macros are enabled. This worked, but it was
really ugly.
3) I considered using Chip Pearson's method for ensuring macros are enabled
(by setting the visibility properties of each sheet:
http://www.cpearson.com/excel/EnableMacros.aspx). However, many of the
features of the workbook are still valuable to the user without macros, and I
want them to be able to use them.

Any thoughts?
Thanks,
~ Horatio


All times are GMT +1. The time now is 02:36 PM.

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