Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Errata....
I wrote: "Jeffrey Marks" wrote: chtNew.SetSourceData Source:=Range( _ "'OAT Test Charts Data_Crosstab'!$F$1:$K$1, Range(ActiveCell,ActiveCell.Offset(0,6)).Select" _ ) <<< Syntactically, it should be: chtNew.SetSourceData Source:=Range( _ "'OAT Test Charts Data_Crosstab'!$F$1:$K$1", Range(ActiveCell,ActiveCell.Offset(0,6)).Select) Actually, even the latter form seems strange. If ActiveCell is not in he 'OAT Test Charts Data_Crosstab' worksheet, the specified range is erroneous. On the other hand, if ActiveCell is in the 'OAT Test Charts Data_Crosstab' worksheet, why use that qualifier for F1:K1? Moreover, specifying Range(range1,range2) is dubious because that selects only the upper-left cell of range1 and the lower-right cell of range2. So your statement is equivalent to: chtNew.SetSourceData Source:=Range("F1",ActiveCell.Offset(0,6)) But I wonder if even that makes good sense. Depends on your intent. PS: I finally did determine that .Select in that context causes a VBA error. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Alt Code Problem | Excel Discussion (Misc queries) | |||
Code problem | Excel Discussion (Misc queries) | |||
Problem with code | Excel Discussion (Misc queries) | |||
CODE PROBLEM | Excel Discussion (Misc queries) | |||
XLS to CSV Code Problem | Excel Worksheet Functions |