Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
dynamic range
hi,
i have the following: Dim NewGraphSource As String Dim testRange As Range testRange = NewGraphSource MsgBox "testrange: " & testRange ActiveSheet.ChartObjects("Chart 7").Activate ActiveChart.ChartArea.Select ActiveChart.SetSourceData Source:=Sheets("Trending").Range(testRange) _ , PlotBy:=xlRows lets just say that NewGraphSource = A14:G14 i am getting an error message: "runtime error 91: object variable or With block variable not set" i am not sure what to do. thanks in advance, geebee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
dynamic range
You are very close:
Dim NewGraphSource As String Dim testRange As Range NewGraphSource = "A14:G14" Set testRange=Range(NewGraphSource) -- Gary''s Student - gsnu200774 "geebee" wrote: hi, i have the following: Dim NewGraphSource As String Dim testRange As Range testRange = NewGraphSource MsgBox "testrange: " & testRange ActiveSheet.ChartObjects("Chart 7").Activate ActiveChart.ChartArea.Select ActiveChart.SetSourceData Source:=Sheets("Trending").Range(testRange) _ , PlotBy:=xlRows lets just say that NewGraphSource = A14:G14 i am getting an error message: "runtime error 91: object variable or With block variable not set" i am not sure what to do. thanks in advance, geebee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
dynamic range based on criteria, within a dynamic range, passed to a function | Excel Programming | |||
creating a dynamic range based on criteria, within a dynamic range, and passing it to a function | Excel Programming | |||
getting the absolute range address from a dynamic named range | Excel Programming | |||
Dynamic Range with unused formula messing up x axis on dynamic graph | Charts and Charting in Excel | |||
select dynamic range with dynamic start point | Excel Programming |