none
How to make vba to read and understand characters in other keyboard language RRS feed

  • Question

  • How to make vba to read and understand characters in other keyboard language

    e.g
    ****************************************************

    Private Sub A_AfterUpdate()
    
     If Not IsNull(Me.A) Then
    
    ' This is not understandable for vba and in editor is writen
    
    ' with unureadable characters
    
      If Trim(Me.A) = "ХШЃЧЌЧЧЃ ШЏФЊЕФР" Then
    
       Me.B = "X"
    
      Else
    
       Me.B = "MKD"
    
      End If
    
     Else
    
      Me.B = Null
    
     End If
    
    End Sub
    
    

    ***************************************
    as weel

    msgbox  "асфјлкфмвкосслчд фдсфлчсдф"
    is shown with unreadable characters
    or
    msgbox me.a.text
    is shown with "???????????????"

    should i turn on some references in VBA
    thanks

    Saturday, May 15, 2010 4:17 AM

Answers

  • Finally I found solution.. it simple, so if someone need this here it is>>>

    1.In Control Panel > Regional and language options> advanced tab
    choose the native language you want to use in language for non-unicode programs
     
    2.In VBA editor choose tools>options>editor format> font which support your language

    and it will work fine

    • Marked as answer by MBMSOFT Thursday, May 20, 2010 6:16 AM
    Thursday, May 20, 2010 6:16 AM

All replies

  • I downloaded and install

    Access 2003 VBA Language Reference

    from

    http://msdn.microsoft.com/en-us/library/aa663079(office.11).aspx

    it seems to be some step forward but still I can't solve problem

    Sunday, May 16, 2010 11:59 PM
  • I TRIED THIS IN VISUAL STUDIO 2008 AND OVERTHERE IS WORKING,WHEN I'M TYPING CHARACTERS IN OTHER LANGUAGE SETTING (I.E CYRILLIC) in VB EDITOR, CHARACTERS ARE SHOWN PROPERLY, AS WELL MSGBOX IS SHOWN PROPERLY IN CYRILLIC LETTERS

    BUT IN VBA 6.5 VERSION FOR ACCESS  IT DOESN.T WORK

    IF I WRITE

    MSGBOX "КИРИЛИЦА",VBINFORMATION,"ИНФО"

    ALL CHARACTERS WRITTEN IN CYRILLIC ARE NOT RECOGNIZED

    PLEASE HELP TO SOLVE THE PROBLEM

    • Edited by MBMSOFT Thursday, May 20, 2010 1:24 AM
    Tuesday, May 18, 2010 3:36 AM
  • I checked this in other 3 computers and it worked out... so the other keyboard language was working properly in VBA editor... but still doesn't work on mine computer should i set something or what????

    Wednesday, May 19, 2010 9:49 PM
  • I changed font in the vba editor with one who is suporting cyrillic keyboard layout, and now characters wrriten in cyrillic are displayd properly in vba editor, but vba does not recognize their meanining

    the following doesn't work

    If Me.myCTL.text = "проба" Then MsgBox "кирилица"

     

    Wednesday, May 19, 2010 11:31 PM
  • Finally I found solution.. it simple, so if someone need this here it is>>>

    1.In Control Panel > Regional and language options> advanced tab
    choose the native language you want to use in language for non-unicode programs
     
    2.In VBA editor choose tools>options>editor format> font which support your language

    and it will work fine

    • Marked as answer by MBMSOFT Thursday, May 20, 2010 6:16 AM
    Thursday, May 20, 2010 6:16 AM
  • Dear MBMSOFT -

    Just found your solution after hours, days and weeks of trying to figure this out!  In my case, it was to be able to use Arabic string variables, defined in a VBA macro, in an inputbox and for pasting into a Word document.

    You are absolutely right.

    I looked (again) at my other computer (on which the macro has always worked fine) to see whether that non-UNICODE program language was set that way (i.e., as Arabic), and indeed it was!  I had already looked at all the settings at least five times, and never noticed that one!

    Hats off!

    Lee

    Friday, January 27, 2012 2:16 AM
  • In my case was there was no combobox option for VBA Editor >Tools>Options>Editor Format>Font:

    I expected a combobox there and could not think, I could choose other fonts by using up and down keys for ages.

    Wednesday, February 3, 2016 1:46 PM
  • Thanks, it works!
    Tuesday, November 8, 2016 8:09 AM
  • hey MBMSOFT,

    I realize that this is a very old threa but had to ask you.

    I tried everything mentioned here and a lot more. Changed the  language for non-unicode programs and the VBA editor format box also has chinese selected as Font. Still, only some of the text is changed but the rest of the text is displayed as question marks.

    Would you be able to help here by any chance?

    Friday, October 5, 2018 3:08 PM
  • Looks good, but what about those with no admin access to change control panel settings? 
    Friday, May 24, 2019 6:23 PM