newbe ComboBox questions
Posted: 17 Jun 2010, 19:16
I've got an already written VB6 app that I'm trying to make Unicode aware and I'm slowly, but surely, converting everything over to the new combo-box control. I've got it partially working and actually displaying some unicode entries, but I'm getting an error that I can't figure out.
I need to get the Index of whatever item happens to be selected in the ComboBox.
In the _SelectionChanged event which provides a newSelectedItem IComboBoxItem, I can do a newSelectedItem.Index and get the information I want and this works well.
If, however, I try to get the value from cbCombo1.SelectedItem.Index, I get the error "Object Variable or With Block Variable not set." This is in working code where I simply swapped out a standard MS ComboBox control with your new one and changed the line from cbCombo1.Index to cbCombo1.SelectedItem.Index.
I'm still trying to wrap my head around how the new control works, so I've probably made a simple error somewhere. Any help would be much appreciated.
I need to get the Index of whatever item happens to be selected in the ComboBox.
In the _SelectionChanged event which provides a newSelectedItem IComboBoxItem, I can do a newSelectedItem.Index and get the information I want and this works well.
If, however, I try to get the value from cbCombo1.SelectedItem.Index, I get the error "Object Variable or With Block Variable not set." This is in working code where I simply swapped out a standard MS ComboBox control with your new one and changed the line from cbCombo1.Index to cbCombo1.SelectedItem.Index.
I'm still trying to wrap my head around how the new control works, so I've probably made a simple error somewhere. Any help would be much appreciated.