View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Position of X-Axis (Top, Left)

What kind of chart? If it's a horizontal bar chart, the X axis is the
vertical axis on the left side of the chart.

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


wrote in message
oups.com...
Hello,
I would to do the following in a Excel Macro:
I want to move a Button to right above the X-Axis of my chart.
This ist my code so far. No matter what I try, the button never
appears directly above the axis, but some inches higher.
What is my mistake?


ActiveSheet.ChartObjects("Diagramm").Activate
ActiveChart.PlotArea.Select
ActiveChart.Axes(xlCategory).Select
'Achse
achselinks = Selection.Left
achseoben = Selection.Top


'Plot
ActiveSheet.ChartObjects("Diagramm").Select
ActiveChart.PlotArea.Select
plotlinks = Selection.Left
plotoben = Selection.Top


'Chartobject
ActiveSheet.ChartObjects("Diagramm").Select
ActiveChart.ChartArea.Select
chartlinks = Selection.Left
chartoben = Selection.Top


'Hier wird der Button verschoeben
ActiveSheet.Shapes("Button").Select
ActiveSheet.Shapes("Button").Top = plotoben + achseoben +
chartoben
ActiveSheet.Shapes("Button").Left = achselinks + chartlinks

Thanks a lot!
Johannes