none
System locale - vba (Excel) RRS feed

  • Question

  • Hello,
    W10 O2016, system locale set to en-US (microsoft recommends for corporate infrastructure:).

    Display language  of W10: czech (special characters eg. příčný).
    Rename sheet name to "příčný", put name "příčný" in one cell.
    If we want to use vba then sheet name in vba editor is prícný, Target.value = prícný (this is problem as we process a lot of information depending on cz language from cell values).

    Is there some way around it without changing system locale to czech?

    PS. Cannot post picture..

    Monday, June 26, 2017 7:14 AM

All replies

  • Even though the VBE and the MsgBox can only display characters in the extended ASCII range, VBA has no problem working with most if not all character sets. Try this with your Czech sheet name -

    s = ActiveSheet.Name ' 
    Range("A2") = s
    For i = 1 To Len(s)
        k = AscW(Mid$(s, i, 1))
        Cells(i, 2) = k
        Cells(i, 3) = ChrW$(k)
    Next

    Monday, June 26, 2017 4:43 PM
    Moderator