PDA

View Full Version : [SOLVED] What is yellow dot parameter of a shape VBA



white_flag
10-26-2016, 02:37 AM
Hello

I have a shape that is created like this:



Sub test1()
Dim shp As Shape


Set shp = ActiveSheet.Shapes.AddShape(msoShapeChord, 200, 50, 150, 150)
With shp
.Fill.Visible = False
.Name = "shape1"
.IncrementRotation 112#
.LockAspectRatio = msoFalse
.Line.Weight = 2.5
.Line.Style = msoLineSingle
.Line.ForeColor.RGB = RGB(255, 0, 0)
End With


End Sub


I am trying to find "the yellow dot" parameter in vba for shapes (if you draw a shape and selec itt, you will see a yellow dot).

Thank you!

Bob Phillips
10-26-2016, 03:45 AM
Do you mean the rotation circle? If you hover over it, you will see the cursor change to a arrowed circle, and you can click and drag the shape around.

white_flag
10-26-2016, 03:55 AM
This one. I forgot to mention that I am using excel 2016.
17427

Bob Phillips
10-26-2016, 04:03 AM
That is a diamond in my setup, and you can use it to resize the shape within the containing box, not the overall size, just the width of the cross struts for instance.

white_flag
10-26-2016, 04:07 AM
ok... but what is the parameter then?

white_flag
10-26-2016, 04:31 AM
it was



.Adjustments(1) = value
'.Adjustments(2) = value
'..etc

white_flag
10-26-2016, 04:32 AM
xld... Thanks for your time! (yellow diamond was the key)

Bob Phillips
10-26-2016, 09:42 AM
it was



.Adjustments(1) = value
'.Adjustments(2) = value
'..etc


Do you know what the array elements (1, 2, etc.) refer to specifically?

white_flag
10-26-2016, 12:34 PM
Do you know what the array elements (1, 2, etc.) refer to specifically?

Not really, some shapes have more then one "diamond yellow" so
.Adjustments(1) = value it is for the first one

.Adjustments(2) = value for the second one ...etc ... I think maximum are 4. and the order (from what I saw in my case) first one from right in clock direction.