MeiR_ct
04-06-2011, 04:00 AM
(This post is cross-posted from: http://www.mrexcel.com/forum/showthread.php?t=541054)
Hi all.
How can I get the current keyboard layout (language code)?
I'm asking this because when "Application.OnKey" tries to assign a key combination, which contains a character in other layout than the active, it will result run-time error 1004 with the following message:
Method 'OnKey' of object '_Application' failed So I want to check the layout first, before running "Application.OnKey".
And I wonder, can Excel listen and know when the keyboard layout gets changed?
Thanks in advance, Meir.
Hi all.
How can I get the current keyboard layout (language code)?
I'm asking this because when "Application.OnKey" tries to assign a key combination, which contains a character in other layout than the active, it will result run-time error 1004 with the following message:
Method 'OnKey' of object '_Application' failed So I want to check the layout first, before running "Application.OnKey".
And I wonder, can Excel listen and know when the keyboard layout gets changed?
Thanks in advance, Meir.