I'm not quite sure what you mean by "Not worksheetchange", but wouldn't this do what you want?Does anyone no a way to trigger a macro by just using the enter key
in a difined rage ("A1:A100")
Not worksheetchange
I diddn't wan't a worksheet_Change event
in some instance's the data wont be changed
i was looking at excuting a macro just by hitting the enter key
Option Explicit
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Workbook_Open()
GetAsyncKeyState vbKeyReturn
End Sub
Option Explicit
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
If GetAsyncKeyState(vbKeyReturn) Then
MsgBox "Enter key pressed within range A1:A100"
End If
End If
End Sub
Yes there is a way, but Why? There may be another approach that you do not know of.