Hola aqui te envio un Ejemplo.
Espero te sea util ..
================================================================
Option Explicit
'==&&== API ==&&===============
Private Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" _
(lpVersionInformation As OSVERSIONINFO) As Long
Private Declare Sub keybd_event Lib "user32" _
(ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Function GetKeyboardState Lib "user32" _
(pbKeyState As Byte) As Long
Private Declare Function SetKeyboardState Lib "user32" _
(lppbKeyState As Byte) As Long
'==&&==Tipo para verificar sobre q Sistema corre el programa
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
'==&&==Constantes
Private Const VER_PLATFORM_WIN32_NT = 2
Private Const VER_PLATFORM_WIN32_WINDOWS = 1
Private Const VK_NUMLOCK = &H90
Private Const KEYEVENTF_EXTENDEDKEY = &H1
Private Const KEYEVENTF_KEYUP = &H2
'==================<<< NumLock >>>=========================
'== Para habilitar teclado numerico , Poner Habilitar a true
'== Para deshabilitar , Poner Habilitar a false
'==========================================================
Public Sub NumLock(Habilitar As Boolean)
Dim bytKeys(255) As Byte
Dim NumLock_On As Boolean
'==&&==copiamos el estado de las teclas virtuales(256) a un buffer
GetKeyboardState bytKeys(0)
'==&&==obtenemos el estado de la tecla
NumLock_On = bytKeys(VK_NUMLOCK)
Dim typOS As OSVERSIONINFO
'==&&==Si el estado actual es <> al enviado
If NumLock_On <> Habilitar Then
'==&&==Si tenemos Win95/98/Me
If typOS.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS Then
bytKeys(VK_NUMLOCK) = 1
SetKeyboardState bytKeys(0)
'==&&==Si es WinNT/2000/XP
Else
'==&&==Simulamos un keypress
keybd_event VK_NUMLOCK, &H45, KEYEVENTF_EXTENDEDKEY Or 0, 0
'==&&==Simulamos un keyRelease
keybd_event VK_NUMLOCK, &H45, KEYEVENTF_EXTENDEDKEY _
Or KEYEVENTF_KEYUP, 0
End If
End If
End Sub