View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
royUK[_74_] royUK[_74_] is offline
external usenet poster
 
Posts: 1
Default Can I prevent a user from running a macro?


If you place the private module in a separate module and use Option
Private Module it will not show in the Macro list for that workbook.


Code:
--------------------
Option Explicit
Option Private Module

Sub test()
MsgBox "Hello World"
End Sub
--------------------


Place the main code in another module


Code:
--------------------
Option Explicit

Sub main()
test
End Sub
--------------------


--
royUK

Hope that helps, RoyUK
For tips & examples visit 'my web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=35285