bradyboyy88
Well-known Member
- Joined
- Feb 25, 2015
- Messages
- 562
So basically I have a few labels and dropdown boxs that once selected it calls a certain macro. My excel sheet is set up such that as you expand the application window column A gets larger to keep everything centered in the excel sheet. So the following code does not work very well since it takes the positioning of the window in the top left corner and adds the textbox therefore if I stretch the window this addtextbox postioning values are no longer in line with my labels and such.
I am wondering if there is a way to get the x and y positioning of my dropdown box and merely input right below that. This allows me to be more consistent with my adding my textboxes right below it.
Code:
With Sheets("sheet1")
.Shapes("Dropdown1).IncrementTop 200
.Shapes("label1").IncrementTop 200
.Shapes("dropdown2").IncrementTop 200
.Shapes("label2").IncrementTop 200
.Shapes.AddTextbox(msoTextOrientationHorizontal, 314, 215, 700, 150).TextFrame.Characters.Text = "Test Box"
End With
I am wondering if there is a way to get the x and y positioning of my dropdown box and merely input right below that. This allows me to be more consistent with my adding my textboxes right below it.