I am looping through all the worksheets in a spreadsheet and want to determine if the worksheet is active or not - active being the worksheet tab being highlighted. Anyone have a suggestion for me?
---
Sub TestFindActiveWorksheets()
Dim objCurrentSheet as Worksheet
Dim x as Integer
For x = 1 to ActiveWorkbook.Worksheets.Count
Set objCurrentSheet = ActiveWorkbook.Worksheets(x)
if objCurrentSheet.{not sure what to put here} = ? then
msgbox objCurrentSheet.Name
end if
next x
End Sub
---
Thanks in advance,
Sheldon
---
Sub TestFindActiveWorksheets()
Dim objCurrentSheet as Worksheet
Dim x as Integer
For x = 1 to ActiveWorkbook.Worksheets.Count
Set objCurrentSheet = ActiveWorkbook.Worksheets(x)
if objCurrentSheet.{not sure what to put here} = ? then
msgbox objCurrentSheet.Name
end if
next x
End Sub
---
Thanks in advance,
Sheldon