Moving a chart

  • Thread starter Thread starter Connie
  • Start date Start date
C

Connie

I need a macro to place the upper left corner of a chart
in the upper left corner of cell B1. How do I do this?

Any help is appreciated...

C ;-)
 
Connie -

Here's the macro. Select the chart and run it.

Sub MoveToB1()
With ActiveChart.Parent
.Top = .Parent.Range("B1").Top
.Left = .Parent.Range("B1").Left
End With
End Sub

To install the macro (in case you need to know how), press Alt-F11 to
open the VB Editor, then choose Module from the Insert menu, and paste
the code into the window that pops up.

To run the macro, go back to Excel, select the chart, press Alt-F8,
choose MoveToB1 from the list, and click on Run.

- Jon
 
Back
Top