Centering Userform objects when maximizing

TheDadliestDad

New Member
Joined
Feb 17, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I've seen another thread that went into this a little bit, but I don't believe it answered my question exactly.

Older thread: Userform object will not center on maximize
OP: oblix
When I first started to set up my Userform in vba about a week ago, it was my first time working with it and I am super proud of what I've made with it.

I have essentially finished every functionality I need for the program to work, however I can't figure out how to get my Userform to center when I maximize it. I tried to look into potential avenues of moving forward when I found the thread above, but it seems like the solution talks of a single object being centered. I was curious if there was any way to center all of the objects that I have on my Userform as a single unit. I see that Frames are a thing in the toolbox and thought that could be a potential solution where I can just attach everything to the frame and then center it. I'm unsure if the functionality of frames goes that deep as I didn't find anything that phrases it just that way, so it may honestly be a terminology issue I'm having. Any help or clarification on what I can do would be stellar! Thank you in advance!

Here is a screenshot of my current Userform setup if it helps to visualize it at all:

1645567493010.png
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I was curious if there was any way to center all of the objects that I have on my Userform as a single unit
Hi! Yes there is. Add all of the objects you want centered into a group (select objects → right click → Group). You can then center the group (Format → Center in Form). You can keep the objects grouped or you can ungroup them immediately afterwards - they'll keep their positions. But, if you want to recenter everything again if you make adjustments you'll need to regroup.

Frames do add a little bit of extra functionality, but they also could be used mostly for aesthetic purposes to group similar controls together visually.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top