ListBox Sizes

KiwiDave

New Member
Joined
Oct 15, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi, I am not fluent in vba. I have a worksheet that has 7 List Boxes on it. Depending on the pc, the List Boxes keep changing their size. I've seen a lot of comments about adjusting the properties but it seems that I should define the exact size of each list box. I know I have to DIM them, but I don't know how. I know there are properties (Height, Left, Width and Top) but what is the syntax to make that happen? I am guessing that I need to DIM each list box but what is that code and where do I put it so that it runs every time I run the programme?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
how about, selecting all your listboxes and right click > Size and Properties and under properties, select donot move or resize with cells.


1635167624639.png
1635167627506.png


hth....
 
Upvote 0
Thank You fadee2. I did try that first, I also unchecked the 'Lock Aspect Ratio'. The issue of the listboxes changing sizes seems to occur whenever the screen size changes from 100%.

I want to use VBA to resize and position the Listboxes everytinme the programme opens.

Is that possible? Where to I place the code to make it happen?

Regards
David
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,411
Members
449,081
Latest member
JAMES KECULAH

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