Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Align Userforms Next to each other in midle of sheet


Hi All

I have 2 comboboxes. I want to align them one next to the other in midle of a sheet.

I have already created 2 buttons to show them.

How can I do it with gap and without gap?

Attached is the file.




Selected Answer

Hi Paul001 and welcome to the forum.

I modified your file and it is attached.

One easy way to achieve what you are asking is to modify the properties of each UserForm. This is what I did to yield the result in my file.

While in the VB Editor, select the UserForm. Then in the properties window (lower left) set StartUpPosition to Manual. Then change the values for Left and Top to place it on the worksheet where you prefer.

There are more involved ways of doing this but I find this the simplest. The down side is that if you change the size of the UserForm you will need to adjust the value for Left for one or both UserForms.

Hope this helps; if so please mark my answer as selected answer.

Cheers   ;-)




Thanks Willie
Paul001 (rep: 6) Nov 25, '22 at 10:38 pm
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login