C
CLR
Hi All......
I recorded a macro that works ok, except that with each sheet deletion, I
get a pop-up that stops the macro execution until I manually acknowledge it.
Oh, another annoyance is that if the sheet does not exist, the macro
crashes.......
Could anyone please help with either problem?
Sub ClearProgram()
'Delete the unwanted sheets
Sheets("q793complete").Select
ActiveWindow.SelectedSheets.Delete
Sheets("tblDPM").Select
ActiveWindow.SelectedSheets.Delete
Sheets("PartTrend").Select
ActiveWindow.SelectedSheets.Delete
Sheets("q794Trends").Select
ActiveWindow.SelectedSheets.Delete
Sheets("q261Defects").Select
ActiveWindow.SelectedSheets.Delete
Sheets("q261Parts").Select
ActiveWindow.SelectedSheets.Delete
'Clear the NUMBERBASE range on the DPMcalcs sheet
Sheets("DPMCalcs").Select
ActiveWindow.ScrollColumn = 1
Application.GoTo Reference:="NUMBERBASE"
Selection.ClearContents
Sheets("Main").Select
Range("C8").Select
End Sub
TIA
Vaya con Dios,
Chuck, CABGx3
I recorded a macro that works ok, except that with each sheet deletion, I
get a pop-up that stops the macro execution until I manually acknowledge it.
Oh, another annoyance is that if the sheet does not exist, the macro
crashes.......
Could anyone please help with either problem?
Sub ClearProgram()
'Delete the unwanted sheets
Sheets("q793complete").Select
ActiveWindow.SelectedSheets.Delete
Sheets("tblDPM").Select
ActiveWindow.SelectedSheets.Delete
Sheets("PartTrend").Select
ActiveWindow.SelectedSheets.Delete
Sheets("q794Trends").Select
ActiveWindow.SelectedSheets.Delete
Sheets("q261Defects").Select
ActiveWindow.SelectedSheets.Delete
Sheets("q261Parts").Select
ActiveWindow.SelectedSheets.Delete
'Clear the NUMBERBASE range on the DPMcalcs sheet
Sheets("DPMCalcs").Select
ActiveWindow.ScrollColumn = 1
Application.GoTo Reference:="NUMBERBASE"
Selection.ClearContents
Sheets("Main").Select
Range("C8").Select
End Sub
TIA
Vaya con Dios,
Chuck, CABGx3