Bonjour membres du forum !
Voici une base de données conçue par moi même dont je voudrais afficher
un ruban personnalisé.
Le nom de la table du ruban"USYSRIBBONS" qui contient les code XML suivants:
et un module vb:"LOADRIBBONS" dont voici les codes:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 <CustomUI xmlns="http://schemas.microsoft.com/office/2009/07/CustomUI> <Ribbon startfromScratch="false"> <tabs> <tab idMso="TabCreate"="false"/> <tab id="dbCustomTab"visible="true"> <group id="dbCustomGroup"label="Presse-papier"> <control idMso="Copy"label="Copier"enable="true"/> <control idMso="Cut"label="Couper"enable="true"/> <control idMso="Paste"label="Coller"enable="true"/> </group> </tab> </tabs> </ribbon> </CustomUI>S V P, aidez moi à afficher le ruban personnalisé.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 Option Compare Database Option Explicit Dim Rs As DAO.Recordset Public Function LoadRibbons() On Error GoTo erreur_LoadRibbons Set Rs = CurrentDb.OpenRecordset("select * from USysRibbons") If Not Rs.EOF Then Do Until Rs.EOF LoadCustomUI Rs!NomRuban, Rs!XMLRuban Rs.MoveNext Loop End If End Function Set Rs = Nothing GoTo fin erreur_LoadRibbons: Select Case Err Case 32609 GoTo fin Case Else MsgBox Err.Number & " " & "err.description", vbCritical End Select fin: End Function
Pièce-jointe
Cordialement
Partager