V
VILLABILLA
Hello!
I use Excel 2000.
I have a macro that creates a chart. I assigned this macro to a
autoshape. When I am done looking at the chart I have to delete it
Isn't there a way to make things in such a way that I could just toggl
the chart to appear and dissapear? For example with an additional macr
or toggle button or something...
This is how the macro looks like:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 25.2.2004 by Registered User
'
'
Range("B3:J3,B5:J5").Select
Range("B5").Activate
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceDat
Source:=Sheets("Sheet1").Range("B3:J3,B5:J5"), _
PlotBy:=xlRows
ActiveChart.SeriesCollection(1).Name = "=""Target"""
ActiveChart.SeriesCollection(2).Name = "=""Actuals"""
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "T vs A"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
ActiveWindow.Visible = False
Windows("try out.xls").Activate
Range("A3").Select
End Sub
Every idea is welcome!
p.s.
I am not familiar with VBE language so please explain like to a 4 yea
old
Thanks a lot!
Robb
I use Excel 2000.
I have a macro that creates a chart. I assigned this macro to a
autoshape. When I am done looking at the chart I have to delete it
Isn't there a way to make things in such a way that I could just toggl
the chart to appear and dissapear? For example with an additional macr
or toggle button or something...
This is how the macro looks like:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 25.2.2004 by Registered User
'
'
Range("B3:J3,B5:J5").Select
Range("B5").Activate
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceDat
Source:=Sheets("Sheet1").Range("B3:J3,B5:J5"), _
PlotBy:=xlRows
ActiveChart.SeriesCollection(1).Name = "=""Target"""
ActiveChart.SeriesCollection(2).Name = "=""Actuals"""
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "T vs A"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
ActiveWindow.Visible = False
Windows("try out.xls").Activate
Range("A3").Select
End Sub
Every idea is welcome!
p.s.
I am not familiar with VBE language so please explain like to a 4 yea
old
Thanks a lot!
Robb