Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to hide macros in Excel?

Tags:

excel

vba

I just finished some VBA and I was wondering if there is a way to hide certain macros on Excel.

I need the user to run a certain macro and only that one, but it shows all the sub macros in Excel. I want to hide the unnecessary macros from the user so that way the user doesn't accidentally click on the wrong one.

like image 355
DaBeau96 Avatar asked Sep 18 '17 20:09

DaBeau96


People also ask

How do I hide all macros in Excel?

Add the word “Private” at the beginning of the “Sub” line with a space between the word and the name of the macro. Save the macro and it will no longer appear on the list of macros within the workbook.


1 Answers

You can also do this by placing the macros you want to hide in a separate module and using Option Private Module at the top of the module before the code. The macros will still be available to your project but will not appear in the Macros seen by the user when he clicks the Macros button.

like image 54
JohnDunsmuir Avatar answered Sep 28 '22 19:09

JohnDunsmuir