View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Boris Boris is offline
external usenet poster
 
Posts: 67
Default VBA - identifying which worksheet is active

Many thanks for the suggestion. This would definately work but is more
complicated than I had hoped for. I was hoping Index would work but I get an
error message when I try that - might of course be my typing.
Anyway, thanks for the suggestion.
Best wishes, Boris.

"Gary''s Student" wrote:

Sub which()
Dim n As String
n = ActiveSheet.Name
i = 1
For Each w In Worksheets
If w.Name = n Then
MsgBox (i)
End If
i = i + 1
Next
End Sub
--
Gary''s Student - gsnu200753