View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Yet another undesired pop-up

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