Hide Macro
Hi,
You can do that with a password in your VBA module, however passwords in
excel can be broken
go to your VBA application, tools, VBAProject - Project Properties,
Protection, enter your password, then each time you want to go to VBA to see
the macros it will ask for the password
To apply macro to a button, go to Developer, Insert, insert your button and
assign the Macro,
"Thanks" wrote:
Hello
Im using the following macros to protect/unprotect all sheets in my work book.
Sub Protect_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:="password"
Next ws
End Sub
Sub unprotect_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect Password:="password"
Next ws
End Sub
For my use I would like to assign a hot key to run the macros but I would
also like to hide the macros from other users I suppose my making the code
private. Apparently I cant do this because when I make the code private my
hot keys don't work.
How can I accomplish both requirements?
|