just use the keycode of the = key (187)
- (minus) key is 189
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 187 Then
Form1.Caption = "Plus Key Down"
ElseIf KeyCode = 189 Then
Form1.Caption = "Minus Key Down"
Else
Form1.Caption = "Some other key Down"
End If
End Sub
or
Code:
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc("=") Then
Form1.Caption = "Plus Key Down"
ElseIf KeyAscii = Asc("-") Then
Form1.Caption = "Minus Key down"
Else
Form1.Caption = "Some other key Down"
End If
End Sub