Boa noite!!
Pelo que eu estou percebendo, vai ser complicado...
Tente usar o metodo SelectionChange
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.OnKey "~", "SuMacro"
End Sub
Tente usar o metodo Change
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("Sua_Célula_Ou_Intervalo_Alvo")) Is Nothing Then
SuaMacro
End If
End Sub
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
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 04/02/2013 7:34 pm