Hi,
I'd like to add a sheet, whereby I delete the sheet before if it exists.
Simple, I would have thought![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
strSheetName="XYZ"
On Error Resume Next
Sheets(strSheetName).Delete
On Error GoTo 0
Sheets.Add after:=(strSheetName)
however I get the error message "Application-defined or Object-defined error"
Can anyone help?
Thanx
I'd like to add a sheet, whereby I delete the sheet before if it exists.
Simple, I would have thought
strSheetName="XYZ"
On Error Resume Next
Sheets(strSheetName).Delete
On Error GoTo 0
Sheets.Add after:=(strSheetName)
however I get the error message "Application-defined or Object-defined error"
Can anyone help?
Thanx