USERFORM SIZE

neilp

Well-known Member
Joined
Jul 5, 2004
Messages
515
Hi guys

I'm sure this is an easy question, but is there a bit of code that will determine the size of the userform. I would normally just drag the form to the correct size, but I am looking at having a command button that when pressed will cause the userform to increase in size

Hope this makes sense

Cheers in advance

Neil
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

tmcfadden

Board Regular
Joined
Aug 17, 2005
Messages
151
So, you would have two command buttons perhaps. The first one shows the form (non-modal).

The second one simply calls a macro with something like:
Userform1.Height = 100
Userform2.Width = 200

You might want to check to see if the userform is visible.

-Tim
 

neilp

Well-known Member
Joined
Jul 5, 2004
Messages
515
cheers Tim

that has given me all the info I need. Obviously you meant userform1 not 2 in the second line :p

thanks again

n
 

Forum statistics

Threads
1,141,681
Messages
5,707,791
Members
421,527
Latest member
Tamiwsw

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
Top