Vba Naming a Created Line Connector

ericmax79

New Member
Joined
Dec 13, 2013
Messages
37
[FONT=Verdana, serif]HelloMy Name IS Eric Nice To Meet you all .....[/FONT][FONT=Verdana, serif] [/FONT][FONT=Verdana, serif]

Ihave a simple Question .I would like to name a shape in excel uponits creation ...... I Can name the"line" in the macro....But I would like every other line created after its Name to be"numerated or given a unique identifier while keeping its parentname "Jimmy". I believe it has to do with a "eventHandler " but i am way to new to excel to determine exactly whati need ...........Please Help Someone ! code attached below.........
[/FONT]
[FONT=Verdana, serif] [/FONT][FONT=Verdana, serif]
Like"Jimmy1" "Jimmy2" etc
[/FONT]
[FONT=Verdana, serif] [/FONT][FONT=Verdana, serif]

[/FONT]
Code:
[/FONT][/COLOR][COLOR=#333333][FONT=Verdana, serif][SIZE=2]
SubNeave_Click()
ActiveSheet.Shapes.AddConnector(msoConnectorStraight,400, 150, 800,150).Select
Selection.ShapeRange.Line.BeginArrowheadLength =msoArrowheadShort
Selection.ShapeRange.Line.BeginArrowheadStyle =msoArrowheadStealth
Selection.ShapeRange.Line.BeginArrowheadWidth= msoArrowheadNarrow
Selection.ShapeRange.Line.EndArrowheadLength= msoArrowheadShort
Selection.ShapeRange.Line.EndArrowheadStyle =msoArrowheadStealth
Selection.ShapeRange.Line.EndArrowheadWidth =msoArrowheadNarrow
Selection.ShapeRange.Line.Weight =2.5
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0,255)
Selection.Name = "Jimmy"
End Sub[/SIZE][/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]
[FONT=Verdana, serif]Thankyou in advance Eric Maxfield [/FONT]
 
Howard

I have 7 different names that i would like to perform different calculations based on there name . I cannot do this with a nested if statment for there are to many "arguments " excel says . So i am looking for a suggestion to do a "loop" possibley . The nuts and bolts of the function is ..... Find name in Row Column A ......... Compile a number into column D ...... Based On The Name of the Person ...... I have attached a Workbook named "7 Name " Thank you guys so much .



Code:
[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 961"]
<colgroup><col><col span="5"><col></colgroup><tbody>[TR]
[TD] Name [/TD]
[TD]Time [/TD]
[TD]Commisson [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Aric 0[/TD]
[TD="align: right"]41.55556[/TD]
[TD="align: right"]21.36111[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]I would Like "  if Aric then d1= b1 *c1 [/TD]
[/TR]
[TR]
[TD]Aric 1[/TD]
[TD="align: right"]31.44444[/TD]
[TD="align: right"]5.694445[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Aric 2[/TD]
[TD="align: right"]14.22222[/TD]
[TD="align: right"]5.027778[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Aric  3[/TD]
[TD="align: right"]16.88889[/TD]
[TD="align: right"]4.75[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Aric 4[/TD]
[TD="align: right"]11.66667[/TD]
[TD="align: right"]2.527778[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Eric 0[/TD]
[TD="align: right"]0.222222[/TD]
[TD="align: right"]21.13889[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]If Eric then d1 = B1 + c1 [/TD]
[/TR]
[TR]
[TD]Eric 1[/TD]
[TD="align: right"]9.555555[/TD]
[TD="align: right"]0.138889[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Eric  2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]4.25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ronny 3[/TD]
[TD="align: right"]15.66667[/TD]
[TD="align: right"]0.138889[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]If Ronny then d1 = B1 - c1 [/TD]
[/TR]
[TR]
[TD]Ronny 4[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]5.472222[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Harry 5[/TD]
[TD="align: right"]14.55556[/TD]
[TD="align: right"]0.25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]If Harry  then d1 = B1 * c1 [/TD]
[/TR]
[TR]
[TD]Harry 6[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]37.11111[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Rick 7[/TD]
[TD="align: right"]18.66667[/TD]
[TD="align: right"]0.138889[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]If Rick  then d1 = B1 / c1 [/TD]
[/TR]
[TR]
[TD]Rick 8[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]5.583333[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Vallerie 9[/TD]
[TD="align: right"]2.444444[/TD]
[TD="align: right"]0.027778[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]If Vallerie then d1 = B1 = c1 [/TD]
[/TR]
[TR]
[TD]Valerie 10[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]3.472222[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Wally  11[/TD]
[TD="align: right"]8.555555[/TD]
[TD="align: right"]0.027778[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]If Wally  then d1 = B1 +  c1 [/TD]
[/TR]
[TR]
[TD]Wally  12[/TD]
[TD="align: right"]0.111111[/TD]
[TD="align: right"]3.583333[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

<tbody>
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
You are in excellent hands if Andrew is looking at your post.

Answer his questions and you will get a quality solution.

Regards,
Howard
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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