deleting worksheets

This is a discussion on deleting worksheets within the Spreadsheets forums in Other Technologies category; I am writing an Excel 2003 VBA application that generates a new worksheet. I want to delete the new worksheet when I close the program. The recorded macro is: Sub deletesheet() Sheets( Sheet2 ).Select ActiveWindow.SelectedSheets.Delete End Sub It works, but the procedure is interrupted by the warning: Data may exist in the sheet(s) selected for deletion. To permanently delete the data, Press Delete delete button cancel button What must I do to by-pass this warning/action and let the delete process go forward without any inputs from me? vbatyro...

Go Back   Database Forum > Other Technologies > Spreadsheets

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-14-2008, 05:54 PM
Default deleting worksheets

I am writing an Excel 2003 VBA application that generates a new
worksheet. I want to delete the new worksheet when I close the
program. The recorded macro is:

Sub deletesheet()
Sheets("Sheet2").Select
ActiveWindow.SelectedSheets.Delete
End Sub

It works, but the procedure is interrupted by the warning:

"Data may exist in the sheet(s) selected for deletion. To permanently
delete the data, Press Delete"

delete button cancel button

What must I do to by-pass this warning/action and let the delete
process go forward without any inputs from me?

vbatyro
Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 05:40 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.