Setting a Worksheet Name as a Variable Help
I'm modifying some existing code to clear the contents of worksheet "RDBMerge" and then to set this worksheet as a variable called DestSh.Name
I've managed to clear the contents, but I need help with the second part to set it as a variable instead of creating a new RDBMerge worksheet.
' Clear the summary sheet.
Application.DisplayAlerts = False
On Error Resume Next
Sheets("RDBMergeSheet").UsedRange.ClearContents
On Error GoTo 0
Application.DisplayAlerts = True
' Add a new summary worksheet.
Set DestSh = ActiveWorkbook.Worksheets.Add
DestSh.Name = "RDBMergeSheet"
|