Changing a user form's elements sizing with input from worksheet or user form

SerenityNetworks

Board Regular
Joined
Aug 13, 2009
Messages
131
Office Version
  1. 365
Platform
  1. Windows
I have a user form that displays images. In my case, the bigger I can display the images the better it will be for the user. If I scale the user form for the display on my laptop's monitor then when I choose to use a larger external monitor the images are not nearly as large as the monitor is capable of displaying. I'd like to be able to manipulate the size of the user form, and the size and position of different elements within the user form. Is there a way to do this from within Excel, or using fields or buttons on the user form itself? For example, I could have an 'increase width' button on the user form. Clicking it would increase the width of the user form 'n' pixels. I could also have a corresponding button to decrease the width of the user form, and buttons to increase and decrease the height. If manipulating the form by using buttons on the form isn't feasible then could it be done using values in an Excel worksheet? I'm open to any option that lets me resize the user form and some of the elements in the form.

I've placed an example of the workbook here. (In this example I've trimmed out a bunch of code for other fields and functions and just left the basics.)

Any help will be greatly appreciated.

Thanks in advance,
Andrew
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Ah, never mind. I modified my searches and found the answers. I didn't expect it to be so easy.
Code:
    With WebBrowser1
        .Height = 138
        .Width = 400
        .Top = 12
        .Left = 144
    End With
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,146
Members
449,098
Latest member
Doanvanhieu

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