Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that is supposed to delete a sheet from the active workbook:
Sub RemoveSheet() Dim sh As Object On Error Resume Next Set sh = Worksheets("Summary") On Error GoTo 0 If Not sh Is Nothing Then sh.Delete End If End Sub The sheet is not deleted. I have double-checked the name of the sheet using: MsgBox "Sheet name is: x" & ActiveSheet.Name & "x" There are no leading or trailing spaces. Does it matter that this sheet is a chart? I would appreciate any help you can give me with checking to see if a sheet exists before trying to delete it. Thank you, Judy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
delete value on worksheet 2 that match values on worksheet 1 | Excel Discussion (Misc queries) | |||
How to delete chart | Charts and Charting in Excel | |||
delete chart | Excel Discussion (Misc queries) | |||
How to delete a duplicate Excel worksheet within that worksheet? | Excel Discussion (Misc queries) | |||
Using VBA to Delete a Chart | Excel Programming |