How to draw multi Arc Shape in in one group Lock like (Smiley Face 11) with adding Adjustment Item
thanks
How to draw multi Arc Shape in in one group Lock like (Smiley Face 11) with adding Adjustment Item
thanks
I sorry About duplicate this mistake from my side connection give me there is problem in connection
from Mr Cheers Andy post
Andy Pope
how to collect Below 4 Arcs in 1 Arc group
Sub FourQuadarents()
Dim shpArc As Shape
Set shpArc = CreateArc(50, 50, 100, 100, 0, 360)
Set shpArc = CreateArc(108, 110, 10, 10, 0, 360)
Set shpArc = CreateArc(172, 110, 10, 10, 0, 360)
' colour segement
CreateArc(100, 170, 50, 30, 180, 360).Fill.ForeColor.SchemeColor = 43
End Sub
Function CreateArc(XLeft As Single, XTop As Single, XRadius As Single, YRadius As Single, _
StartAngle As Single, EndAngle As Single) As Shape
'
Dim intAngle As Integer
Dim dblA1 As Double
Dim dblB1 As Double
Dim dblA2 As Double
Dim dblB2 As Double
Const PI = (22 / 7) ' 3.14159265358979
With ActiveSheet.Shapes.BuildFreeform( _
msoEditingAuto, XLeft + XRadius, XTop + YRadius)
For intAngle = StartAngle To EndAngle
dblA2 = XLeft + XRadius + (Cos((intAngle * (PI / 180))) * XRadius)
dblB2 = XTop + YRadius - (Sin((intAngle * (PI / 180))) * YRadius)
.AddNodes msoSegmentLine, msoEditingAuto, dblA2, dblB2
Next
.AddNodes msoSegmentLine, msoEditingAuto, XLeft + XRadius, XTop + YRadius
Set CreateArc = .ConvertToShape
End With
End Function
Last edited by DOSSFM0Q; 07-19-2014 at 04:54 AM.
Please add your code betwen tags (#), according to the forum rules.
Notice my main language is not English.
I appreciate it, if you reply on my solution.
If you are satisfied with the solution, please mark the question solved.
You can add reputation by clicking on the star * add reputation.
Thanks Like this
#Sub FourQuadarents()
Dim shpArc As Shape
Set shpArc = CreateArc(50, 50, 100, 100, 0, 360)
Set shpArc = CreateArc(108, 110, 10, 10, 0, 360)
Set shpArc = CreateArc(172, 110, 10, 10, 0, 360)
' colour segement
CreateArc(100, 170, 50, 30, 180, 360).Fill.ForeColor.SchemeColor = 43
End Sub#
#Function CreateArc(XLeft As Single, XTop As Single, XRadius As Single, YRadius As Single, _
StartAngle As Single, EndAngle As Single) As Shape
'
Dim intAngle As Integer
Dim dblA1 As Double
Dim dblB1 As Double
Dim dblA2 As Double
Dim dblB2 As Double
Const PI = (22 / 7) ' 3.14159265358979
With ActiveSheet.Shapes.BuildFreeform( _
msoEditingAuto, XLeft + XRadius, XTop + YRadius)
For intAngle = StartAngle To EndAngle
dblA2 = XLeft + XRadius + (Cos((intAngle * (PI / 180))) * XRadius)
dblB2 = XTop + YRadius - (Sin((intAngle * (PI / 180))) * YRadius)
.AddNodes msoSegmentLine, msoEditingAuto, dblA2, dblB2
Next
.AddNodes msoSegmentLine, msoEditingAuto, XLeft + XRadius, XTop + YRadius
Set CreateArc = .ConvertToShape
End With
End Function #
@dossfmoq
Please read the forumrules, before posting again.
Please also use these rules.
Please add your code between tags (as asked before).
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
(This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
Here is how to add code tags
Gooday Sir
I Want to collect all of below shapes in uonin Group, not by Like this(Selection.ShapeRange.Group)
thank you for your help
![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Thank you Sir for respond, but I need to be all Nodes of Shapes in Nodes for One Shape Like this Sir Smile.PNG of
![]()
Please Login or Register to view this content.
I Want to collect all of below shapes in uonin Group, not by Like this(Selection.ShapeRange.Group)
In that case I don't think you can. You can not define complex shapes link that.
Why do you not want to use a group?
Thank You Sir
Last edited by DOSSFM0Q; 07-22-2014 at 04:43 AM.
Looks like you might be able to do this with a combination of powerpoint and excel.
Use powerpoint to create the shape.
http://blogs.office.com/2012/03/20/c...werpoint-2010/
The use the shape Nodes objects in excel to manipulate it.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks