Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Respond to Excel message box from macro

hi
at the beginning of the macro....
application.displayalerts = false
then at the end of the macro..
application.displayalerts = true

or turn the built in excel alert messages off then BEFORE exiting the macro
TURN them back on. (turning back on VERY important)

look up the displayalerts property in vb help.

regards
FSt1




"JackGombola" wrote:

I open and close Excel 2003 workbooks from within an Excel 2003 Ver 11 SP3
macro. I sometimes change the files but never want to save my changes.

What statements can I inlude in my macro code to:
1. Respond "Disable Macros" to the "Security Warning" message box that pops
up when I open the file and it contains macros?

2. Respond "No" to the "Do you want to save the changes you made to ..."
message box when I close the file?

Thanks in advance for any suggestions.

John

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Respond to Excel message box from macro


You can't disable the security warning, it's there for your safety and
the user of the workbook!

As for the save warning, you could capture it with your own warning in
the before close event but if you want automatic, in the thisworkbook
module add: Private Sub Workbook_BeforeClose(Cancel As
Boolean)
ThisWorkbook.Saved = True
End Sub you can still save your work via FILESAVE ot the
Save icon.

FSt1;248516 Wrote:
hi
at the beginning of the macro....
application.displayalerts = false
then at the end of the macro..
application.displayalerts = true

or turn the built in excel alert messages off then BEFORE exiting the
macro
TURN them back on. (turning back on VERY important)

look up the displayalerts property in vb help.

regards
FSt1




"JackGombola" wrote:

I open and close Excel 2003 workbooks from within an Excel 2003 Ver

11 SP3
macro. I sometimes change the files but never want to save my

changes.

What statements can I inlude in my macro code to:
1. Respond "Disable Macros" to the "Security Warning" message box

that pops
up when I open the file and it contains macros?

2. Respond "No" to the "Do you want to save the changes you made to

..."
message box when I close the file?

Thanks in advance for any suggestions.

John



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=69347

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
respond to message box Avecina Excel Programming 4 August 11th 06 02:34 PM
user input into active excel macro- prompt - respond -insert-cont Richard Duke Excel Programming 1 February 18th 06 02:44 PM
How do I respond to a Solver Results Dialog Box from a macro? gmk49 Excel Discussion (Misc queries) 1 September 7th 05 02:22 PM
Automatically respond to message box appearing within a VBA macro Daniel75 Excel Programming 3 February 25th 05 06:15 PM
macro to respond to clipboard prompt? gary Excel Programming 4 September 15th 03 03:59 AM


All times are GMT +1. The time now is 07:57 PM.

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

About Us

"It's about Microsoft Excel"