Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to position drop-down lists via VBA?

Status
Not open for further replies.

Accesser

Technical User
Jun 3, 2002
44
0
0
US
Hi there,

In a form, I have a bunch of combo boxes that vary in their 'top' and 'left' positions.

However, I'd like for their drop-down lists to all be positioned the same, having the same top and left position when selected. Is it possible to force their positions?

Thanks,
Eric
 
You don't want to do this. If you move them when selected, you'd have to move them back when the user moved to the next control, since they'd all overlap.

It's easier to create 3 additional "fake" combo boxes where your original ones are now. You can put the original ones anywhere else. In the Form_Load, move all your original combos to the desired position with visible = false. That way they'll always be where you want them.

When the user clicks on the corresponding fake box, set that original combo to visible (the other 2 to not visible), set the focus to that combo, and use the dropdown property to open that combo.
 
Thanks for your reply and info Jiqjaq.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top