[RESOLVED] Converting cmb.ItemData(cmb.NewIndex) into Microsoft Forms 2.0 Object Library Control
Im currently converting VB.ComboBox to MSForms.ComboBox due to unicode issue.
Is there anyway to imitate the following code?
Code:
cmb.ItemData(cmb.NewIndex) = 0
MSForms.ComboBox doesn't support .ItemData and .NewIndex anymore.
I'm greatly appreciate for responses
Re: Converting cmb.ItemData(cmb.NewIndex) into Microsoft Forms 2.0 Object Library Control
you could try using a hidden column in the combobox as forms2 combo support multi column
Re: Converting cmb.ItemData(cmb.NewIndex) into Microsoft Forms 2.0 Object Library Control
Are you are aware that MS Forms 2.0 are not redistributable?
Re: Converting cmb.ItemData(cmb.NewIndex) into Microsoft Forms 2.0 Object Library Control
Darn, I don't have a ComboBox control yet that I could advertise! :D Anyways, there is atleast one freely usable Unicode ComboBox control at Planet Source Code. If you're looking for other controls, I have a textbox, listbox and a label done, but they're not final/stable releases yet.
The advantage over Forms 2.0 is that the syntax is compatible and the controls are freely distributable/usable.
Re: Converting cmb.ItemData(cmb.NewIndex) into Microsoft Forms 2.0 Object Library Control
I do aware of MS Forms 2.0 is not redistributable.
The application comes along with microsoft office so its not a problem at all :)
Re: Converting cmb.ItemData(cmb.NewIndex) into Microsoft Forms 2.0 Object Library Control
I use multiple column approach, it works!
Code:
cmb.BoundColumn = 1
cmb.ColumnCount = 2
cmb.TextColumn = 1
cmb.Column(1, cmb.ListCount - 1) = 0
the .TextColumn is for which column to be displayed in selected list
But i got another issue which is to show only 1 column in populated combobox.
I can find any column hide function for that. Any idea?
Re: Converting cmb.ItemData(cmb.NewIndex) into Microsoft Forms 2.0 Object Library Control
make the width of the first column the width of the combo
Re: Converting cmb.ItemData(cmb.NewIndex) into Microsoft Forms 2.0 Object Library Control
Found the solution :)
Code:
cmb.ColumnWidths = "450pt;0pt"
Works like charm! Thanks guys
Re: Converting cmb.ItemData(cmb.NewIndex) into Microsoft Forms 2.0 Object Library Control
Thread moved
Sounds like you are doing this in Access VBA anyways so the end user will need Access installed at a minimium.
Ps, dont forget to Resolve your thread from the Thread Tools menu so others know your question has been answered. ;)