Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-22-2012, 12:05 AM
macropod's Avatar
macropod macropod is offline Application.OnKey Numeric Plus? Windows 7 64bit Application.OnKey Numeric Plus? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

As you can see from the link, there is no {ADD} argument for OnKey. That's because there's no ADD key. However, you can use:
Code:
Sub ReAssignKeypad()
Application.OnKey "{096}", "KeyPad0"
Application.OnKey "{097}", "KeyPad1"
Application.OnKey "{098}", "KeyPad2"
Application.OnKey "{099}", "KeyPad3"
Application.OnKey "{100}", "KeyPad5"
Application.OnKey "{101}", "KeyPad5"
Application.OnKey "{102}", "KeyPad6"
Application.OnKey "{103}", "KeyPad7"
Application.OnKey "{104}", "KeyPad8"
Application.OnKey "{105}", "KeyPad9"
Application.OnKey "{106}", "KeyPadMult"
Application.OnKey "{107}", "KeyPadPlus"
Application.OnKey "{109}", "KeyPadMinus"
Application.OnKey "{110}", "KeyPadPoint"
Application.OnKey "{111}", "KeyPadDiv"
End Sub
Sub KeyPad0()
    MsgBox "You pressed: 0"
End Sub
Sub KeyPad1()
    MsgBox "You pressed: 1"
End Sub
Sub KeyPad2()
    MsgBox "You pressed: 2"
End Sub
Sub KeyPad3()
    MsgBox "You pressed: 3"
End Sub
Sub KeyPad4()
    MsgBox "You pressed: 4"
End Sub
Sub KeyPad5()
    MsgBox "You pressed: 5"
End Sub
Sub KeyPad6()
    MsgBox "You pressed: 6"
End Sub
Sub KeyPad7()
    MsgBox "You pressed: 7"
End Sub
Sub KeyPad8()
    MsgBox "You pressed: 8"
End Sub
Sub KeyPad9()
    MsgBox "You pressed: 9"
End Sub
Sub KeyPadMult()
    MsgBox "You pressed: *"
End Sub
Sub KeyPadPlus()
    MsgBox "You pressed: +"
End Sub
Sub KeyPadMinus()
    MsgBox "You pressed: -"
End Sub
Sub KeyPadPoint()
    MsgBox "You pressed: ."
End Sub
Sub KeyPadDiv()
    MsgBox "You pressed: /"
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.OnKey Numeric Plus? How to do an alpha numeric Sort By? Opul3nce Excel 1 10-15-2012 11:11 PM
Application.OnKey Numeric Plus? Sum Formula in the range with Numeric and NonNumeric data cells Spanec Excel 2 01-12-2012 09:15 AM
Application.OnKey Numeric Plus? alt+numeric doesn't work Kungen Word 3 12-02-2011 11:25 AM
Application.OnKey Numeric Plus? Convert numeric value into words KIM SOLIS Excel 5 09-12-2011 10:53 PM
Application.OnKey Numeric Plus? Validation for length and numeric type chamsy Excel 1 10-22-2010 07:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:56 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft