VB script turns off NUMLOCK

  • Thread starter Thread starter berj
  • Start date Start date
B

berj

I am running a VB script which monitors changes on an Excel spreadsheet and
sends out an email. After the script runs, my NUMLOCK is turned off. Why
does it do this? Any ideas?

Thanks,
Berj
 
Here is the code which I am using:


Dim oldvalue As Variant

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 10 Then
Recipient = "(e-mail address removed)"
Subj = Target(1, -6) & " -- had " & oldvalue & " -- " & Target.Value & "
left"
msg = "Hi there the workbook is changed"
HLink = "mailto:" & Recipient & "?"
HLink = HLink & "subject=" & Subj & "&"
HLink = HLink & "body=" & msg
ActiveWorkbook.FollowHyperlink (HLink)
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys "%s", True
End If
End Sub

Private Sub worksheet_SelectionChange(ByVal Target As Range)
oldvalue = Target.Value
End Sub
 
It is really weird. It only turns off NUMLOCK temporarily, for a few
minutes, then everything is normal.

The "NUM" indicator at the bottom right of the spreadsheet does not go away,
it still shows as if NUMLOCK is still on.

I have tried this on 2 computers with the same results............

Also, the post which was pointed out in an earlier post on Google groups,
the poster had the same problem which I had.

Berj

Ron de Bruin said:
Your code didn't turn off the numlock for me
The same for me
 
If you walk away from the pc with numlock off (so there's no chance for
interaction), does it get toggled back?

Just curious--I don't have any followup guess.
It is really weird. It only turns off NUMLOCK temporarily, for a few
minutes, then everything is normal.

The "NUM" indicator at the bottom right of the spreadsheet does not go away,
it still shows as if NUMLOCK is still on.

I have tried this on 2 computers with the same results............

Also, the post which was pointed out in an earlier post on Google groups,
the poster had the same problem which I had.

Berj
 
Back
Top