Thread: Dynamic chart
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
alvin Kuiper alvin Kuiper is offline
external usenet poster
 
Posts: 175
Default Dynamic chart

Hi!!
I have this
Range("A1:A12,E1:E12").Select
Range("E1").Activate
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Ark1").Range("A1:A12,E1:E12"), _
PlotBy:=xlColumns
ActiveChart.Location Whe=xlLocationAsNewSheet
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Kvartal4"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With

As you can se i use A1:A12 This is allright allways
but ,E1:E12 this i want to change after the headline

Like i have 8 colluns with headline, this headlines i also have in a
combobox in my form now if i choose headline2 It shal use b1:b12 or if i use
Headline4 it shall use
d1:d12 -- can i do this. ??

Or/and can i use a name on a range to this like if i have a name on the range
call "HEadline3" and in this range have i d1:d12


Hope some one undersrtand me

Alvin