0

I am trying to create a VBA script that contain a certain text in French, it actually works well on my MacBook with the Lucida Grande font but since this font doesn't exist on windows the macro does not work in it and whenever I change the font to any one that could support French language it neither delete the characters or replace them with insignificant ones, a part of the code is below, please if some one have the answer i will be so grateful. thank you.

For i = 2 To LRow

    ' colonne E "."
    index = WorksheetFunction.Match(".", Sheets("DATA_1").Range("1:1"), 0)
    
    If Cells(i + 1, index).Value = "" Then
    
        Cells(i + 1, index).EntireRow.Delete
        
    End If
    'colonne K "Quelle était votre situation professionnelle 6 mois après l'obtention de votre titre (mois de février) ? "
    
    index = WorksheetFunction.Match("Quelle était votre situation professionnelle 6 mois après l'obtention de votre titre (mois de février) ?", Sheets("DATA_1").Range("1:1"), 0)
    
    If Cells(i + 1, index).Value = "" Then
    
        Cells(i + 1, index).EntireRow.Delete
        
    End If
freeflow
  • 4,129
  • 3
  • 10
  • 18
  • This code found the text string which means it's not the font that is causing the issue. `Index = InStr(1, Sheets(4).Range("A1").Value, "Quelle était votre situation professionnelle 6 mois après l'obtention de votre titre (mois de février) ?", 0)` – Brett Nov 26 '21 at 13:31
  • I actually didn't understand well what you said, but as I told the problem is not the code... is when I open the macro in a windows laptop and try to see the script I find it delete the French characters or replace them – ali hanzaz Nov 26 '21 at 15:42
  • Did you try `Lucida Sans Unicode (Western)` – CDP1802 Nov 26 '21 at 19:16
  • yes and it doesn't work I will retry – ali hanzaz Nov 27 '21 at 12:39
  • @ali I guess you could try exporting the modules on the mac and importing them on windows. Is is an old Mac ? – CDP1802 Nov 27 '21 at 14:42
  • no actually it's a MacBook Air M1 2020, I will try the exportation processes – ali hanzaz Nov 27 '21 at 15:20

0 Answers0