I know this should be a simple problem but I just cant seem to get it
right. I have built a custom toolbar using Word VBA that works fine.
However, my toolbar contains a combobox with a list of options. I am
trying to write a routine that will access the .text value of the combo
box so it can do the appropriate thing based on the user choice in the
combobox. So basically my code works like this...
'+++++++++++++++++++++++++++++++++++++++++++++++++++++
Public CBarCategoryComboBox As Office.CommandBarComboBox
Dim Qtype as String
Private Function SetupCommandButtons() As Boolean
'Create my toolbar including the combobox in question
'Combobox is called CBarCategoryComboBox
End Function
Private Sub InsertQuestion()
'-> I need to get the value of the combobox from this routine and
THIS IS WHERE I GET THE OBJECT VARIABLE OR WITH BLOCK VARIABLE NOT SET
ERROR 91!
QType = CbarCategoryComboBox.Text
'etc.....
End Sub
Could somebody tell me why I cant access the CBarCategoryComboBox.text
value without this error?
Thanks.
Mike
mhawbs@gmail.com - 13 Oct 2005 21:30 GMT
Good to see I wasnt going crazy. In case anyone down the road runs
into this problem here is the answer.
http://support.microsoft.com/default.aspx?scid=kb;en-us;319832