vendredi 2 juin 2017

Excel VBA Checkboxes English vs French

I have an Excel file which needs to deal with checkboxes. The names of the checkboxes are defined automatically in French (due to my installation being french). For example "Case à cocher 100" instead of "Checkbox 100".

However, when our sibling company uses this Excel file, it crashes due to their installation being English.

Is there a way to make the following work for English and French?

ActiveSheet.CheckBoxes("Case à cocher 488").Interior.Color = RGB(255, 255, 255)
ActiveSheet.CheckBoxes("Case à cocher 383").Interior.Color = RGB(255, 255, 255)
ActiveSheet.CheckBoxes("Case à cocher 467").Interior.Color = RGB(255, 255, 255)
ActiveSheet.CheckBoxes("Case à cocher 461").Interior.Color = RGB(255, 255, 255)
ActiveSheet.CheckBoxes("Case à cocher 460").Interior.Color = RGB(255, 255, 255)
ActiveSheet.CheckBoxes("Case à cocher 459").Interior.Color = RGB(255, 255, 255)
ActiveSheet.CheckBoxes("Case à cocher 458").Interior.Color = RGB(255, 255, 255)
ActiveSheet.CheckBoxes("Case à cocher 8").Interior.Color = RGB(255, 255, 255)

I can't seem to find a way to rename the checkbox's name.




Aucun commentaire:

Enregistrer un commentaire