The reason setting NUM LOCK doesn't always work is that it is only temporarily set until SendKeys yields to another process.
You can use an API to permanently set NUM LOCK. MSDN has an article on this. Search for "HOWTO: Toggle the NUM LOCK, CAPS LOCK, and SCROLL LOCK Keys" and PSS ID Number: 177674.
This world is not my home. I'm just passing through.
Declare Function GetKeyboardState Lib "user32" _
Alias "GetKeyboardState" (ByVal pbKeyState() As Byte) As Long
Private Sub Button1_Click...
Dim state(256) As Byte
GetKeyboardState(state)
If state(Keys.NumLock) = 1 Then
MsgBox("true") 'Only for test
SendKeys.Send("{NUMLOCK}")
' My code
SendKeys.Send("{NUMLOCK}")
Else
MsgBox("false") 'Only for test
' My code
End If