Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Test for Insert Key

Status
Not open for further replies.

hmstoo44dd

Programmer
Sep 27, 2002
32
US
How can I test to see if the insert key has been set to on?
I am working in Reflection for IBM and need to insert data into a row.

I cannot use 'Session.Transmit rcIBMInsertKey' if the insert is on because it will toggle it off.
 
Try this:
[blue]
Code:
Option Explicit
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer

Function InsertMode() As Boolean
  InsertMode = (GetKeyState(vbKeyInsert) = 1)
End Function

Sub test()
  MsgBox "Insert mode is " & InsertMode
End Sub
[/color]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top