Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Lloyd Alvarez   on Sep 08 In MS Office Category.

  
Question Answered By: Grant Jones   on Sep 08

You can assign a unique name to each schematic using the Name Box. The Name Box
is the textbox on the left side of the formula bar. It displays the address of
the active cell. When you select one of your schematic groups, the name of that
group is displayed in the Name Box. Click in the Name Box and type in a new
name. You can name ranges of cells the same way.

When you copy & paste the schematic to the chart  sheet, it will retain  the
name you assigned, and you can refer to it using that name. Here are some
unsophisticated examples of code:

Sub Macro1()
'Copies shape TestGroup1 from Sheet1 to Chart1
Sheets("Sheet1").Shapes("TestGroup1").Select
Selection.Copy
Sheets("Chart1").Select
ActiveChart.Paste
End Sub

Sub Macro2()
'Activates the chart sheet (must do this!), selects
'the shape TestGroup1 and rotates it 90 degrees.
Sheets("Chart1").Activate
ActiveChart.Shapes("TestGroup1").Select
Selection.ShapeRange.IncrementRotation 90#
End Sub

Sub Macro3()
'Deletes TestGroup1 shape from the chart sheet
ActiveChart.Shapes("TestGroup1").Select
Selection.Delete
End Sub

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Shapes & Charts Or get search suggestion and latest updates.


Tagged: