Hi accessman2
I am not sure what you mean by "Tab" key, but I have assumed it is the sheet tabs ?
To detect worksheet Tab Click (and Ctl+PageUp/Down) you can use the following events in the 'ThisWorkbook' module
Code:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
MsgBox "Tab Clicked (Sheet changed TO " & Sh.Name & ")"
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
MsgBox "Sheet changed (" & Sh.Name & ") Cell " & Target.Address
End Sub
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
MsgBox "Tab Clicked (Sheet changed FROM " & Sh.Name & ")"
End Sub
and to detect moving around a sheet (Curser keys, Tab key, move click) you can use the following events in the individual sheet module(s). ALso sheet changes
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "Changed"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox "Moved"
End Sub
Does that help ?
MTB