Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Enable Macros Warning

Hide essential worksheets and put the message on the visible sheet. Have
your code enable your project by unhiding the sheet and unlocking things,
moving the message sheet out of the way. It if doesn't run, not much to
work with. In the beforeclose event you would have to "reseal" your
workbook and save it.

Regards,
Tom Ogilvy

"Phil Perry" wrote in message
...
I believe you can't bypass the initial screen in Excel
which asks you to select to disable macros (default button
for pete sake) or enable macros. Is there a way I can
put a message on there to advise the program will not
run unless you enable macros...or other procedure to
overcome this.
cheers



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Enable Macros Warning

Tom,

In the beforeclose event you would have to "reseal" your
workbook and save it.

I don't think that the "Before_Close" is where the code to
"reseal" the workbook should be placed. Doing so would
allow the user to "Save" with all the sheets unhidden.
To force a "Save" on closing would be undesirable too since
the user might have already saved and now wants to just close
out without saving subsequent changes.
The method that I use does have the undesirable effect that
it briefly displays the "Warning" screen when the file is saved
but it insures that it is indeed saved with only the one sheet
visible and returns the user to where they left off before the
save.

John


Tom Ogilvy wrote:

Hide essential worksheets and put the message on the visible sheet. Have
your code enable your project by unhiding the sheet and unlocking things,
moving the message sheet out of the way. It if doesn't run, not much to
work with. In the beforeclose event you would have to "reseal" your
workbook and save it.

Regards,
Tom Ogilvy

"Phil Perry" wrote in message
...
I believe you can't bypass the initial screen in Excel
which asks you to select to disable macros (default button
for pete sake) or enable macros. Is there a way I can
put a message on there to advise the program will not
run unless you enable macros...or other procedure to
overcome this.
cheers


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Enable Macros Warning

If the user saved with sheets unhidden, it would be a moot point if I then
hid the sheets and saved in before close. While you raise a valid point,
disabling events and saving freely is an obvious option which overcomes any
event driven solution. Use of addins and compiled code would be much
stronger approaches.

Regards,
Tom Ogilvy


"John Wilson" wrote in message
...
Tom,

In the beforeclose event you would have to "reseal" your
workbook and save it.

I don't think that the "Before_Close" is where the code to
"reseal" the workbook should be placed. Doing so would
allow the user to "Save" with all the sheets unhidden.
To force a "Save" on closing would be undesirable too since
the user might have already saved and now wants to just close
out without saving subsequent changes.
The method that I use does have the undesirable effect that
it briefly displays the "Warning" screen when the file is saved
but it insures that it is indeed saved with only the one sheet
visible and returns the user to where they left off before the
save.

John


Tom Ogilvy wrote:

Hide essential worksheets and put the message on the visible sheet.

Have
your code enable your project by unhiding the sheet and unlocking

things,
moving the message sheet out of the way. It if doesn't run, not much to
work with. In the beforeclose event you would have to "reseal" your
workbook and save it.

Regards,
Tom Ogilvy

"Phil Perry" wrote in message
...
I believe you can't bypass the initial screen in Excel
which asks you to select to disable macros (default button
for pete sake) or enable macros. Is there a way I can
put a message on there to advise the program will not
run unless you enable macros...or other procedure to
overcome this.
cheers




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort Warning disabled? Need to enable it gnat Excel Discussion (Misc queries) 4 May 28th 21 09:23 AM
Enable autorepublish warning message (using static web page)? M Excel Discussion (Misc queries) 2 November 23rd 10 01:44 AM
Macro Enable/Disable Pop-Up Warning juamig Excel Discussion (Misc queries) 2 April 8th 10 11:37 PM
Macros warning always shows up, even if all macros removed Joe M Excel Discussion (Misc queries) 1 December 20th 07 04:45 AM
Enable macro warning box Lesley Excel Discussion (Misc queries) 2 February 27th 07 05:10 PM


All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"