View Single Post
  #2   Report Post  
Old October 30th 04, 09:04 PM
Posts: n/a

I don't believe you can do it as a worksheet function. You can however walk
thru the sheets collection to find a sheet name. The code listed below walks
thru each worksheet and checks the name against "Sheet2". If it exists it
places the sheet name in cell a1 of the active sheet.

Sub findit()
Dim ws As Worksheet

For Each ws In Sheets
If ws.Name = "Sheet2" Then
[a1] = ws.Name
End If

End Sub

"drvortex" wrote:


I'm really stumped here. Need to find out the function (IF) on
checking to see if a particular "Worksheet" exists. I have a macro
setup to automatically CREATE new worksheets in the same workbook;
however, I have another sheet that is referencing data on the new
worksheets on the final worksheet. Any suggestions?? This is urgent
and any info would be a great help.


drvortex's Profile:
View this thread: