Deleting a sheet during macro
Try it this way...
Application.DisplayAlerts = False
Sheets("Sheet8").Delete 'Change sheet name as needed
Application.DisplayAlerts = True
--
Rick (MVP - Excel)
"jeff" wrote in message
...
During a macro, a sheet is deleted. However, the user gets a box that
basically asks if it’s ok to continue. The message is “Data may exist
in the sheet(s) selected for deletion. To permanently delete the data,
press Delete.”
Is there a way to prevent this message from coming up? It will only
cause confusion to the user.
Thanks,
jeff
|