VBA userform Z-order not working

Grahhhhh

New Member
Joined
Apr 26, 2017
Messages
40
I'm strictly trying to improve aesthetics of my userform. I have over 200 labels, checkboxes, textboxes, buttons, etc. I wanted to add a frame control with a darker background to place behind some of the controls at different times (so it doesn't make sense to put the controls within the frame(strictly aesthetic)), however since the frame is the most recent object I added to the userform, it's layered as the top most object.

The problem is that programmatically setting the z-order doesn't seem to do anything, and the option: Format--> Order --> Send to back/Send backwards is grayed out.

I'm not certain why I'm being blocked out from accessing the z-order, what am I missing?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Thanks RedBeard, I've seen that post, and had tried reorganizing per those methods and still no effect. It boggles me because I know what I want to do, and theoretically how to do it, but for some reason VBA doesn't respond :mad:
 
Upvote 0
The Z order of container controls (like frame or multipage) is only relative to other container controls, so you can't do what you want. I suggest you use a different type of control - eg a textbox or label - to give the appearance you are after.
 
Upvote 0
No kidding. Huh... yeah, what you're saying makes sense. I guess I put my blinders on and didn't consider that it didn't have to be a frame, only that the frame order wasn't "working". Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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