2

I get wrong characters and "???" instead of Hebrew when trying to retrieve a folder path using VBA (by user browse selection) then plot it with question marks.

I changed the locale. Is there any command to convert to UTF-8?

This is from a recorded macro from SOLIDWORKS that does a SaveAs on the open file in a Hebrew folder path (happening also in Excel and every other app):

Dim swApp As Object
Dim Part as Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long

Sub main()

    Set swApp = Application.SldWorks
    Set Part = swApp.ActiveDoc
    Save As

    longstatus = Part.SaveAs3("\\domain\users_profiles$\lila\Desktop\??? ????\models\FH-02-003.SLDASM", 0, 0)

End Sub
4
  • Can you please show the code to retrieve the folder? Commented Oct 23, 2024 at 6:59
  • hi, just edited my question Commented Oct 23, 2024 at 7:57
  • @lila it's because of OS localization, try to change system locale, go to Control Panel=>Region=>Administrative=>Change system local... select Hebrew and restart you machine. Commented Oct 23, 2024 at 8:07
  • 2
    Guido's StringTools library (single module) has UTF-8 conversion and more. A must-have in VBA. It also handles all locales and is cross-platform/Mac-compatible. Commented Oct 23, 2024 at 8:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.