LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default macro to automatcially delete a worksheet

I have added some code to my access form, which exports to excel in several
sheets.
The code is:

.ActiveWindow.SelectedSheets.Delete

this deletes the current sheet (which i have to do, as i copy data from it,
and this makes the sheet redundant).

However, the problem is the delete function brings up a dialog box asking you
to confirm the deletion, which i want to bypass/automatically select ok.

I ran a macro to get this code, so i guessed it would show all the workings
(which it doesn't)
Since this is not a normal dialog box, I could not get the VBbuttonok etc to
work.

How can I autoselect ok on the messagebox? Or is there a better way of
deleting a worksheet?

--
Message posted via http://www.officekb.com

 
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
Delete a Column when in a Macro-Worksheet Event? jeannie v Excel Worksheet Functions 2 July 19th 07 01:58 AM
How to delete a macro froma worksheet [email protected] Excel Programming 1 May 2nd 06 01:50 PM
copy 40 tabs into 1 tab automatcially?? Little pete Excel Worksheet Functions 2 March 28th 06 01:49 PM
Delete VBA code in worksheet through a macro Chip Pearson Excel Programming 1 July 23rd 04 09:35 AM
Delete VBA code in worksheet through a macro Ken Wright Excel Programming 0 July 22nd 04 08:59 PM


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