View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JK
 
Posts: n/a
Default convert a string to range?

Hi folks,

Not a programmer, try to write a macro to refresh a chart base on the
range I choose, say, in the previouse step, set "A1:A1, K1:P1, A5:A5,
K5:P5, A10:A10, K10:P10" to string variable wkrange.
then:

ActiveChart.SetSourceData Source:=Sheets("sheet1").range(wkrange) _
, PlotBy:=xlRows

I get run-time error '1004'

I know something wrong with range(wkrange), would you please shed some
light here?


Jack