graph

  • Thread starter Thread starter eli5m
  • Start date Start date
E

eli5m

1. how do i delete graphs from worksheet


2. i create 2 graphs in one sheet - i need to move it to right side
used this code :

ActiveChart.ChartArea.Select
ActiveSheet.Shapes(ChartName).IncrementLeft 140.5
ActiveSheet.Shapes(ChartName).IncrementTop 100.25

but the problem is when i copy the excel file to a different compute
the location
is changing ... so how do i make it fit to all??
 
Try relating the chart's new position to the left and top
of the worksheet, like this:

ActiveChart.ChartArea.Select
ActiveSheet.Shapes(ChartName).Left = 300
ActiveSheet.Shapes(ChartName).Top = 200

Adjust these until the chart shows up where you want it.

You can also put the upper-left corner of the chart in a
certain cell like this:

ActiveChart.ChartArea.Select
ActiveSheet.Shapes(ChartName).Left = _
ActiveSheet.Range("J10").Left
ActiveSheet.Shapes(ChartName).Top = _
ActiveSheet.Range("J10").Top

tod
 
Don't spend so much time selecting everything.

To get two charts side by side, try this:

With ActiveSheet
.ChartObjects(1).Left = 0
.ChartObjects(2).Left = .ChartObjects(1).Width
.ChartObjects(2).Top = .ChartObjects(1).Top
End With

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top