Specific Right-to-Left Language letter changes to question mark when copied from worksheet into VBA Editor

Viewed 49

I have problem with this certain letter in Farsi ("ی") which whenever I try to copy it from excel worksheet into VBA editor it turn to "?".

Is there any options/modifications in Windows or VBA editor that I can set to avoid replacing these question marks with "chrw(1740)" function to identify this letter in my excel ranges texts?

1 Answers

  protected filterOptions() {
    if (!this.agencyList) {
      return;
    }
    let search = this.entityFilterCtrl.value;
    if (!search) {
      this.filteredEntities.next(this.agencyList.slice());
      return;
    } else {
      if (search.includes('ی')) {
        search = search.replace(/ی/g, 'ي');
      }
      search = search.toLowerCase();
    }
    this.filteredEntities.next(
      this.agencyList.filter(bank => bank.name.toLowerCase().indexOf(search) > -1)
    );
  }

Related