Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to realize "enable macro" by VBA when opening a file with macr
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to realize "enable macro" by VBA when opening a file with macr
Please put the question in the body of the post. The Subject line only holds
so many characters and the ending gets truncated. If your question is: Can VBA code make Excel "Enable Macros" when the file is opened, the answer is NO. That would defeat Excel's security and anyone could run malicious code at will. The user has the choice to run the macros or not. If you are distributing a workbook with macros and are having a problem with the way they have their security set so your macros won't run, there is a couple of things you can do. You can digitally sign the VBProject within the VBEditor. The recipient will then be asked if you are a trusted source to run macros. They need only answer yes once. Your digital signature is then added to their "Trusted Sources" list. From then on, the workbook will open normally, and any new workbooks you send them that have your digital signature on it. Another way that does not require a signature is to use a Warning Sheet that says something like "Macros must be enabled to use this workbook. Close the workbook, re-open it and "Enable Macros". Write code so that when the workbook is closed, all sheets are hidden except the Warning Sheet. Also write code when the workbooks opens, hide the Warning Sheet and unhide all the other sheets. If someone opens the workbook with macros disabled, then the code that unhides all the other sheets will not run. All they get is the Warning Sheet. Mike F "FrankJIN" wrote in message ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do i enable "Group" & "Ungroup" in a protected sheet | Excel Discussion (Misc queries) | |||
Macro "disable or enable" screen | Excel Discussion (Misc queries) | |||
"openinf file..."ENABLE MACROS...DISABLE MACROS" | Excel Discussion (Misc queries) | |||
How do i enable "Group" & "Ungroup" in a protected sheet | Excel Discussion (Misc queries) | |||
Forcing "Macro Enable" | Excel Programming |