Thread: Hide Macro
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
thanks thanks is offline
external usenet poster
 
Posts: 48
Default Hide Macro


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?