VBA - Get Coordinates of Textbox

ZedsDead

New Member
Joined
Nov 19, 2015
Messages
6
Hi all,

I'm trying to find the coordinates of a textbox within vba. The textbox is within a user form and I'm sure there's a simple way to grab the coordinates but I've got no idea how to do it.

Thanks in advance for looking over this!

ZD
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Assuming by co-ordinates, you mean the position in the Form, you want the top and left properties of the control
 
Upvote 0
Hi Kyle,

Thanks for your help! I'm trying to resize the Main Work Area so that it changes depending on where the last combobox is; I've got combo boxes being generated depending on how many the user wants.

Regards,

ZD



--Update--

Fixed the issue now, used your advice with the Top property and added some padding to push the Work Area below the combo box.

Thanks again for your help Kyle!!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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