Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Having a macro interact with a dialog box.

I have a macro that creates a worksheet in a workbook.
Imports data in it formats it, prints it, and then the
macro deletes the worksheet.

When I run the macro evrything is done perfectly except
that I have to interact when a dialog box confirming the
deletion of the worksheet pops up.

Is there some code that would let the macro answer "OK" to
the dialog box so that it could run unattended?

My code is as follows:

ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("Sheet1").Select
ActiveWindow.SelectedSheets.Delete
'Dialog box appears here
Range("A6").Select
End Sub

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Having a macro interact with a dialog box.

Louis,

Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete

HTH
Anders Silvén

"Louis" skrev i meddelandet ...
I have a macro that creates a worksheet in a workbook.
Imports data in it formats it, prints it, and then the
macro deletes the worksheet.

When I run the macro evrything is done perfectly except
that I have to interact when a dialog box confirming the
deletion of the worksheet pops up.

Is there some code that would let the macro answer "OK" to
the dialog box so that it could run unattended?

My code is as follows:

ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("Sheet1").Select
ActiveWindow.SelectedSheets.Delete
'Dialog box appears here
Range("A6").Select
End Sub

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Having a macro interact with a dialog box.

I'll try tha

Thanks
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
Macro Dialog Box cardosol Excel Discussion (Misc queries) 1 May 10th 08 03:51 AM
Macro dialog box won't leave me alone! cmccurdy23 Excel Discussion (Misc queries) 1 February 2nd 07 08:06 PM
Replacement of Testdirector( Test Managment Tool -Mercury Interact Microsoft Excal Can Replace Testdirector Excel Worksheet Functions 0 September 14th 06 10:49 AM
Dialog Box With Macro Buttons (VBA) Peter W Soady \(UK\) Excel Discussion (Misc queries) 4 August 20th 06 07:37 PM
how to use the search dialog via a macro? cyrille Excel Worksheet Functions 4 February 17th 05 10:41 PM


All times are GMT +1. The time now is 08:42 AM.

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"