View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
TroyW TroyW is offline
external usenet poster
 
Posts: 32
Default Suppress the Disable Macros / Enable Macros Dialog

Alan,

Here is some code that will create an Excel4Macro sheet in the workbook. You
don't need to put any macro code on the sheet. As you noted, the presence of
the Macro sheet in the workbook will force the user to reply "Yes" to enable
the macros -OR- not open the workbook. The xlVeryHidden will hide the Macro
sheet.

Troy

Sub AddMacro4Sheet()
ActiveWorkbook.Sheets.Add Type:=xlExcel4MacroSheet
ActiveSheet.Visible = xlVeryHidden
End Sub



"Alan" wrote in message
...

"Shoji Karai" wrote in message
...

Is there a way to suppress the dialog box that pops up when Excel starts
up asking whether the macros are to be disabled or enabled? I naturally
want the macros to be enabled as well. I just want to take out the
possibility of the user disabling the macros.


Hi Shoji,

Not sure if it solves for you either, but I asked a similar question
recently and got some ideas back.

Thread is he

...

If that doesn't work for you (and I would like to achieve almost exactly
what you do), then perhaps other suggestions might follow your post.

HTH,

Alan.