J
John Keith
THIS MONTH has a command button named "btnProcessData"
After the copy, the new sheet that has been renamed to the text string
stored in sWksName still has the button named exactly the same (verified with
a For Each loop displaying the names of all shapes on the new sheet)
Why does this code cause an error?
With ThisWorkbook
.Sheets("THIS MONTH").Copy After:=.Sheets(.Sheets.Count)
.Sheets("THIS MONTH (2)").Name = sWksName
.Sheets(sWksName).Shapes("btnProcessData").Delete
End With
The ".delete" is getting a runtime error 1004 application defined or object
defined error.
After the copy, the new sheet that has been renamed to the text string
stored in sWksName still has the button named exactly the same (verified with
a For Each loop displaying the names of all shapes on the new sheet)
Why does this code cause an error?
With ThisWorkbook
.Sheets("THIS MONTH").Copy After:=.Sheets(.Sheets.Count)
.Sheets("THIS MONTH (2)").Name = sWksName
.Sheets(sWksName).Shapes("btnProcessData").Delete
End With
The ".delete" is getting a runtime error 1004 application defined or object
defined error.