0

So here’s my question:

I need to rename a set of worksheets using Arabic or Russian text in order to get my VBA to work, but when I try to put any non-Latin characters into the code they convert to question marks. How can I prepare my VBA code so that it will retain the Arabic or Cyrillic characters? Ideally I would be able to do a find and replace (for example: converting all instances of the word نظرة عامة to Overview). If a find and replace is not possible the main goal is just to retain non-Latin characters even if it requires some amount of copy pasting.

I definitely found a Band-Aid solution for now where I am just referring to sheets by number rather than name – I don’t have any other sample code, sorry. Here’s the first part of the code (and then it repeats like nine more times):


Sub Activate_Sheet_BasedOnIndex()
'
' Macro3 Macro
'
' Keyboard Shortcut: Ctrl+Shift+V
'
    Worksheets(2).Activate
    'Or
    Sheets(2).Activate
    ActiveSheet.Name = "Vue d'ensemble"
    ActiveSheet.Protect "Password"

Clay Campbell
  • 168
  • 13
  • here ist the soluation : https://stackoverflow.com/questions/18868029/arabic-characters-dont-show-in-excel-vba-code – Kris Jan 30 '21 at 12:36
  • Excel gives each sheet a `CodeName` which you can use to address the sheet regardless of what name the user gave to the tab. The `CodeName` is always English. So, if you just want to access the sheets, address them by their code names. But if you want to rename the sheets, `Sheets(2).Name = "Vue d'ensemble"` would do the job just fine (forget about Activate or Select). – Variatus Jan 30 '21 at 13:04

0 Answers0