A
ALESSANDRO Baraldi
I need to cicle throught CommandBarPupup because
i need to Change Icon, Descriprion and Function Colled
by code......!
I try with this:
cboMnu=ComboBox containing my PopUp List Menù
i fill this Comboo on Form Load Event all OK right now
Private Sub Form_Load()
Dim cbr As CommandBar
Dim strMnu As String
For Each cbr In Application.CommandBars
If InStr(cbr.name, "mnu_Popup") Then
strMnu = strMnu & cbr.name & ";"
End If
Next
Me.cboMnu.RowSource = strMnu
End Sub
after to have chosen my PopupMenù i Need to
chose a single Control, so i need to Fill my ListBox
with all Controls collection on After_Update Combo
Event:
Private Sub cboMnu_AfterUpdate()
Dim cb As CommandBar, cbpTools As CommandBarPopup
Dim cbTool As CommandBar
Dim intTotalCurrent As Integer, intCurrControl As Integer
Dim strMnu As String
'***************** In the Next Row i Receive Error **************
'***************** Type no corresponding (sorry for English) ******
Set cb = CommandBars(Me.cboMnu)
Set cbpTools = cb.FindControl(Type:=msoControlPopup)
Set cbTool = cbpTools.CommandBar
intTotalCurrent = cbTool.Controls.count
For intCurrControl = 1 To intTotalCurrent
strMnu = strMnu & cbTool.Controls(intCurrControl ).DescriptionText
Next
End Sub
I don't know why and where i make mistake....!
I use A2002, Referenced by Microsoft Office 10.0, DAO 3.6
Someone can Help me....?
Thank you very much.
i need to Change Icon, Descriprion and Function Colled
by code......!
I try with this:
cboMnu=ComboBox containing my PopUp List Menù
i fill this Comboo on Form Load Event all OK right now
Private Sub Form_Load()
Dim cbr As CommandBar
Dim strMnu As String
For Each cbr In Application.CommandBars
If InStr(cbr.name, "mnu_Popup") Then
strMnu = strMnu & cbr.name & ";"
End If
Next
Me.cboMnu.RowSource = strMnu
End Sub
after to have chosen my PopupMenù i Need to
chose a single Control, so i need to Fill my ListBox
with all Controls collection on After_Update Combo
Event:
Private Sub cboMnu_AfterUpdate()
Dim cb As CommandBar, cbpTools As CommandBarPopup
Dim cbTool As CommandBar
Dim intTotalCurrent As Integer, intCurrControl As Integer
Dim strMnu As String
'***************** In the Next Row i Receive Error **************
'***************** Type no corresponding (sorry for English) ******
Set cb = CommandBars(Me.cboMnu)
Set cbpTools = cb.FindControl(Type:=msoControlPopup)
Set cbTool = cbpTools.CommandBar
intTotalCurrent = cbTool.Controls.count
For intCurrControl = 1 To intTotalCurrent
strMnu = strMnu & cbTool.Controls(intCurrControl ).DescriptionText
Next
End Sub
I don't know why and where i make mistake....!
I use A2002, Referenced by Microsoft Office 10.0, DAO 3.6
Someone can Help me....?
Thank you very much.