[VB6]
Okay, Basically i have created a program which works in just the same was a macro.
The application listens for a key to be pressed before it sends the text which is inside one of the text boxes on the form.
What i have been trying to do is make it so that the user can define their own button to press to send the macro
Currently it works if in the code if specify something like vbkeyF1 or vbKeyY or any vbKey code.
But when i try to put it in a variable it just gives me the run time error '13' blah blah....
I have tried using a CONST as a variable but they cannot be changed during run time and are fixed variables.
I Currently use "Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal KEY As Long) As Integer" to listen to global keypresses...
If there is an easier way of being able to listen to keypresses the way i want it please tell me

Thanks if anyone can help...
