Any idea how to change system keyboard lenguage with vba

MBMSOFT

Registered User.
Local time
Today, 11:59
Joined
Jan 29, 2010
Messages
90
Any idea how to change system keyboard lenguage with vba

I tried changing keyboard property in the control property and it works
but i need change in one control only, and if i change property it change for all contols after
so i need code on exit control event to change the system keyboard language
\e.g.
****************************************************
Private Sub A_Enter()
Me.A.KeyboardLanguage = 49
End Sub
Private Sub A_Exit(Cancel As Integer)
Me.A.KeyboardLanguage = 11
'this works(it means that keyboard language for ctl is changed back on english - 11, but system keyboard language remain on 49)
' so i need here to change system keyboard language

End Sub
*************************************************
 
I found the way how to manage this issue , so if it is halpfull for someone here it is:

Quote:
Code:
Private Declare Function ActivateKeyboardLayout Lib _
"user32.dll" (ByVal myLanguage As Long, Flag As Boolean) As Long

'define your desired keyboardlanguage
'find your desired language at [URL="http://www.trigeminal.com/frmrpt2dap.asp"][COLOR=#000088]http://www.trigeminal.com/frmrpt2dap.asp[/COLOR][/URL]

Private Const MKD = 1071 'macedonian keyboard language layout
Private Const eng = 1033 'english(united states)keyboard language layout


Private Sub A_Enter()

Call ActivateKeyboardLayout(MKD, 0)

End Sub

Private Sub A_Exit(Cancel As Integer)

Call ActivateKeyboardLayout(eng, 0)

End Sub
 
Last edited:
Hello
Which statement should I modify to work in windows 64bit with ms access 64bit?
 
This should do the trick:

Code:
Private Declare [COLOR=red]PtrSafe[/COLOR] Function ActivateKeyboardLayout Lib _
"user32.dll" (ByVal myLanguage As [COLOR=red]LongLong[/COLOR], Flag As Boolean) As [COLOR=red]LongLong[/COLOR]
 
HI MBMSOFT
I need to use the Code you kindly provided up there, but I need to use Arabic (Saudi Arabia) and English (United State) .
Your kind reply back will be much appreciated.
Ehab.
 
HI MBMSOFT
I need to use the Code you kindly provided up there, but I need to use Arabic (Saudi Arabia) and English (United State) .
Your kind reply back will be much appreciated.
Ehab.
You are asking on an 8 year old thread. The poster has not posted in 4 years. I am hoping someone can help, but I wouldn't expect MBMSOFT to respond.
 
define your desired keyboardlanguage 'find your desired language at http://www.trigeminal.com/frmrpt2dap.asp Private Const MKD = 1071 'macedonian keyboard language layout Private Const eng = 1033 'english(united states)keyboard language layout
The above link provided in the code is no longer active: so you need to look furth afield: eg:
 
GaP42,
Not really helping, but thanks anyway you took the time to reply.
I'll look into some other active Websites.
 
CJ_London,
Thanks a Million, this is what I was looking for. Much Appreciated.
 
GaP42,
Not really helping, but thanks anyway you took the time to reply.
I'll look into some other active Websites.
Welll if you had not been advised, you would probably still be waiting for a reply?
So i would say it is helpful. :(

Seems to be a habit of yours as well? :(
 

Users who are viewing this thread

Back
Top Bottom