Help: Using Ribbon Control

Instructions and answers to the most common questions about using Ribbon in your application

Translate Ribbon Commands

By changing Caption property of the Button Object you can translate English commands created by xlCompiler into your language.

Example below shows how to translate commands on the Print tab. This workbook is installed with xlCompiler, so you can open it and learn Visual Basic code which manages Ribbon.

#If XLC Then
 With Application.Ribbon.Tabs(TAB_PRINT)
  .Caption = "Impresion"
  .Controls("Btn.Book").Caption = "Impresion" & vbCrLf & "Libro"
 End With
#End If
	

First statement changes Caption of the Print Tab from Print to its Spanish translation.

Second statement translates Print Book button to Spanish.

Example below translates captions of ComboBox items:

#If XLC Then
 With Application.Ribbon.Tabs(TAB_PRINT)
  With .Controls("Combo.Collated")
   .Items.Clear
   .AddItem "Recopilado"
   .AddItem "Sin clasificar"
  End With
 End With
#End If