ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can I start a macro using a # key? (https://www.excelbanter.com/excel-programming/279414-can-i-start-macro-using-key.html)

Ftca

Can I start a macro using a # key?
 
Hi all
can anyone help me with starting a macro called "gsw"
by using the # or | or ~ key?
The reason being I am trying to activate this macro
by barcode scan and I cannot print a barcode using
ctrl + X

TIA



Tom Ogilvy

Can I start a macro using a # key?
 
Have you looked at the onkey method in VBA help?

--
Regards,
Tom Ogilvy

"Ftca" wrote in message
...
Hi all
can anyone help me with starting a macro called "gsw"
by using the # or | or ~ key?
The reason being I am trying to activate this macro
by barcode scan and I cannot print a barcode using
ctrl + X

TIA





Ftca

Can I start a macro using a # key?
 
"Tom Ogilvy" wrote in message
...
Have you looked at the onkey method in VBA help?



As usual Tom
you've steered me in the right direction

a quick google groups search and............

FWIW
I used this method
from vb (shift F11)
insert
module
pasted in

Sub keytrap()
Application.OnKey "{TAB}", "gsw"
End Sub

(seemed your name was in this post/thread too)

now a simple step to subst TAB with one of my prefered choices
and "Bob's yer Uncle!"

Thanks Tom



--
Regards,
Tom Ogilvy

"Ftca" wrote in message
...
Hi all
can anyone help me with starting a macro called "gsw"
by using the # or | or ~ key?
The reason being I am trying to activate this macro
by barcode scan and I cannot print a barcode using
ctrl + X

TIA








All times are GMT +1. The time now is 06:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com