I finally found out how to do it myself, so the issue can be closed.
And here is the solution:
it can't be done in VBA, but you can use the windows API to do it using ActivateKeyboardLayout.
I found the information I needed here:
http://binaryworld.net/Main/CodeDetail.aspx?CodeId=3694