Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro to Force Response in Dialog Box

Is there a way to force the response in a dialog box
within a VBA macro?

For example, I need to perform a save as and overwrite an
existing file. Of course, excel knows the file exists and
asks if you want to perform the overwrite. Since multiple
users will be performing the macro, I want to be able to
force them to do the overwrite.

Any ideas?

Thanks!
JenReyn
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Macro to Force Response in Dialog Box

JenReyn,

Setting DisplayAlerts set to False will skip the overwrite warning.

Sub testit()
Dim blnTemp As Boolean

blnTemp = Application.DisplayAlerts
Application.DisplayAlerts = False
ThisWorkbook.SaveAs "C:\T\test.xls"
Application.DisplayAlerts = blnTemp
End Sub

Rob


"JenReyn" wrote in message
...
Is there a way to force the response in a dialog box
within a VBA macro?

For example, I need to perform a save as and overwrite an
existing file. Of course, excel knows the file exists and
asks if you want to perform the overwrite. Since multiple
users will be performing the macro, I want to be able to
force them to do the overwrite.

Any ideas?

Thanks!
JenReyn



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
How do I transform a word response to a numeric response? kanegaro Excel Discussion (Misc queries) 0 January 11th 08 05:08 PM
How do I set up a daily call out response response register? Pule Excel Worksheet Functions 1 October 7th 07 01:34 PM
Can you Force a Response for Questionnaire rp2chil Excel Discussion (Misc queries) 1 March 9th 07 04:06 AM
Selecting a response on a dialogue box from a Macro ChemicalJasper Excel Discussion (Misc queries) 2 January 4th 07 02:08 PM
Macro for Customer response time Bren.ie Excel Programming 2 November 18th 03 09:42 AM


All times are GMT +1. The time now is 08:40 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"