View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
chad chad is offline
external usenet poster
 
Posts: 273
Default How do I activate the first worksheet?

You might try:

Sub LastSht()
Dim CntSheets As Long

'Activate last worksheet in the workbook
With Application
CntSheets = .Sheets.Count - .Charts.Count
.Worksheets(CntSheets).Activate
End With

End Sub


"Meltad" wrote:

Excellent, and so simple! Cheers Keith.
Is there a way of activating the last sheet again? There may be any number
of sheets so I guess its not Worksheets(20 or whatever).Activate

Thanks, Mel



"Keith74" wrote:

Worksheets(1).Activate

hth

keith