View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default check and/or create sheet "xxx"

Tom,

Dim myName As String

On Error GoTo MakeSheet
myName = Worksheets("xxx").Name
GoTo AlreadyThere

MakeSheet:
Worksheets.Add.Name = "xxx"
MsgBox "I added that sheet"

AlreadyThe
'Other Code

HTH,
Bernie
MS Excel MVP

"Tom" wrote in message
...
Hi,

I want to check if there is a sheet named "xxx".
If there is not I want to create sheet "xxx", if there
is : nothing has to be done

How can I do this in a Marco ?

Thx
Tom