View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dave Dave is offline
external usenet poster
 
Posts: 1,388
Default Create Worksheet BUT If It Already Exists...

I have the following:

Sub EXAMPLE()
Dim 1WorkSheet As String
1WorkSheet = "Sheet One"
Sheets.Add.Name = 1WorkSheet
Worksheets(1WorkSheet).Visible = xlSheetHidden
End Sub

How do I check, before 1WorkSheet is created, that there is not already a
sheet called "Sheet One". And if there is, use the existing sheet, first of
all erasing data in it and carrying on as normal?

Thanks!
Dave