Well, it seems you are not even on the same page with yourself.
The textbox shifts fine when I use a combobox change event. However, I don't have one for each combobox. The textbox's left position is set only upon the form's initialization, thus it will not shift upon a combobox change.
Let me break that up into two statements:
1. "The textbox shifts fine when I use a combobox change event. "
2. "thus it will not shift upon a combobox change"
Sorry, my friend, it either shifts with a change, or it does not. You can not have it both ways.
You are absolutely, totally, wrong in stating the textbox position is "set only upon the form's initialization". That is completely false.
The textbox position is set by the combobox_change event. When the form, any form, initializies it fires the change event, as indeed, by populating the control, you are making a change. ALL other changes will fires _Change, and ALL other changes will adjust the textbox .Left position.
We are not on the same page because, as I stated, EACH combobox has its own Change event. The textbox position is tied to a specific combobox change event. It seems, but I may be wrong, that you are thinking the textbox will move with
any combobox change. No, there is a specific Change event. Read the code.
Code:
Sub [b]ComboBox1[/b]_Change()
TextBox1.Left = ComboBox1.Left + ComboBox1.Width + 10
End Sub
Textbox1 will set its Left positin EVERY time Combobox1 is changed. EVERY time. NOT just at initialization. EVERY time. EVERY time. EVERY time. EVERY time. Read the code. When Combobox1 changes...Textbox1.Left = .....
Since I have repeated this a number of times, and you seem to persist in....well I am not sure what exactly what you are persisting in...I will leave this thread now. I do not see how I can add anything more.
Except to suggest you use combo's FAQ to make a class module and then make a Collection of your comboboxes. b Although you will still be using each combobox change event.
Good luck.
Gerry
My paintings and sculpture