View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How can force enable macros to be able to open my workbook?

Give them a helper workbook that opens the real workbook.

The helper workbook would have a macro that opens the real workbook. If macros
are disabled, then the helper workbook's code won't run--and the real workbook
won't be opened.

The helper workbook would have code that looks like:

Option Explicit
Sub auto_open()
Workbooks.Open Filename:=thisworkbook.path & "\book2.xls", _
Password:="hithere"
ThisWorkbook.Close savechanges:=False
End Sub

Remember to protect that project so that users can't snoop and find the password
to open.

(That said, that kind of protection is pretty weak and can be broken by any user
who is dedicated.)

kcdonaldson wrote:

I would like to be able to force employees to enable macros for a certain
workbook or it will not let them open the workbook. And maybe put a password
on it so if i would like to modify the workbook without the macros enabled.


--

Dave Peterson