K
ker_01
I create a sample BlockArc using:
Sub MakeMyArc()
Sheet1.Range("F6").Worksheet.Shapes.AddShape msoShapeBlockArc, 200, 200,
100, 100
End Sub
Now I want to use the adjustments item(1) to make it the desired size
Sub ResizeIt
ActiveSheet.Shapes("AutoShape 1").Select
Selection.ShapeRange.Adjustments.Item(1) = 2
End Sub
I've tried different values for Item(1), and get all sorts of weird
behavior. Sometimes the whole shape "flips" to the other side of the
(imaginary) circle, and in my testing I can't tell if I should be using
values between 0-1, 0-100, 0-360, etc.
I also (because I can't figure out the pattern in the shape changes) don't
know if the Adjustments.Item(1) is a final value assigned, or if it is a
percentage that is calculated against the existing value, etc.
If anyone has worked with msoShapeBlockArc and could explain to me how to
use Item(1) to create a wedge of a desired size, I'd really appreciate it.
For example:
Initial wedge is created as a half-circle (top half). I'll worry about
rotation later, but for now I want to change it so that it changes with each
loop, for example:
Loop1: wedge is 90 degrees of the circle (25%)
Loop2: wedge is 36 degrees of the circle (10%)
Loop3: wedge is 270 degrees of the circle (75%)
then finally, back to the original size of 180 degrees (50%)
Any information about how Adjustments.Item(1) works would be greatly
appreciated!!
Thank you,
Keith
Sub MakeMyArc()
Sheet1.Range("F6").Worksheet.Shapes.AddShape msoShapeBlockArc, 200, 200,
100, 100
End Sub
Now I want to use the adjustments item(1) to make it the desired size
Sub ResizeIt
ActiveSheet.Shapes("AutoShape 1").Select
Selection.ShapeRange.Adjustments.Item(1) = 2
End Sub
I've tried different values for Item(1), and get all sorts of weird
behavior. Sometimes the whole shape "flips" to the other side of the
(imaginary) circle, and in my testing I can't tell if I should be using
values between 0-1, 0-100, 0-360, etc.
I also (because I can't figure out the pattern in the shape changes) don't
know if the Adjustments.Item(1) is a final value assigned, or if it is a
percentage that is calculated against the existing value, etc.
If anyone has worked with msoShapeBlockArc and could explain to me how to
use Item(1) to create a wedge of a desired size, I'd really appreciate it.
For example:
Initial wedge is created as a half-circle (top half). I'll worry about
rotation later, but for now I want to change it so that it changes with each
loop, for example:
Loop1: wedge is 90 degrees of the circle (25%)
Loop2: wedge is 36 degrees of the circle (10%)
Loop3: wedge is 270 degrees of the circle (75%)
then finally, back to the original size of 180 degrees (50%)
Any information about how Adjustments.Item(1) works would be greatly
appreciated!!
Thank you,
Keith