Toolbar nightmare

arage

Registered User.
Local time
Today, 22:48
Joined
Dec 30, 2000
Messages
537
Toolbar nightmare
I’m trying to implement toolbars as a way to help filter reports & forms in my system, but I’m really stuck here. When I drop a bunch of controls onto my tool bar a couple of things happen:
1 – The control remains “greyed out” – ok granted I understand this as I haven’t linked it to a macro or function.
2 – The CONTROL style isn’t a control style at all & you don’t have options to select such a style, what do I do? :D
 
what about a commandBar object as a toolbar
 
Well I’m going the sophisticated way & trying to create my control in code & have linked the below function to a macro that runs when a report is run, this way after the report is run, the user has the option to further filter the results. However, this code tells me “Variable not defined” on the third line .Add(Type:=msoControlComboBox) & highlights msoControlComboBox, even though this one of the constants allowed for the argument.

Function createCombo()
Set newCombo = CommandBars("Filter Toolbar").Controls _
.Add(Type:=msoControlComboBox)
With newCombo
.AddItem "2000"
.AddItem "2001"
.AddItem "2002"
.Style = msoComboNormal
End With
End Function
 
im not sure sorry maybe someone else will b more help:(
 
Aloha...

I'm not a programmer, but I wonder if you Dim'd newCombo somewhere. If not, I wonder if it would make a difference

Tana
 
Thanks for your help I got it, I fixed the references to 8.0 library & added a missing DIM statement for newCombo.
 

Users who are viewing this thread

Back
Top Bottom