View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default enable macro automatically when we open a workbook

Of course! Open 'ThisWorkbook' and pop your code in there. Someting like
this:
Private Sub Workbook_Open()
MsgBox "Hi, thanks for opening me", vbInformation, "Ozgrid.com"
End Sub

Set Macro security level to 'Low'.

See more details he
http://www.ozgrid.com/VBA/auto-run-macros.htm

Remember, the enable macros issue is part of Excel's inbuilt security &
cannot be bypassed. Individual installations of Excel can alter the settings
so that macros are automatically accepted - this can be done by selecting
Tools|Macros|security & setting the option from High or Medium to Low -
but....it needs to be done for every potential user.... i.e. not a great
solution...


HTH,
Ryan---
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"sam" wrote:

Is there a way to enable macro automatically? everytime I open a specific
workbook?

Thanks in advance