Thread: force macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default force macro

Fiona,

Usual way is to put a message on one sheet that says that the user must run
with Macros enabled. Hide all the other sheets (use xlVeryHidden so that it
cannot be changed in Excel). In the Workbook_Open event add some code to
hide that sheet, and un hide all others. If they don't enable macros, your
macro won't fire, so they only see the warning sheet.

It isn't foolproof, but it should help.

Oh, by the way, add code in the Before_Close event to unhide the warning
sheet, and very hide the others.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Fiona" wrote in message
om...
Is it possible to disable a workbook if the user decides not to enable
macros ?

Obviously if macros are disabled then I can't use macro code :o) but
then the workbook hasn't loaded at that point anyway, or has it ?

Erm? ;O| Well is it possible ?