Chart. SetSourceData Source:=Range (RChart. Offset (2, 0), RChart. Offset (1, (CNum - 1))) like drawing functions of Why can't SourceData is custom arrays or Dim AllElements As the Variant And in the pivot table function
The SourceData here must be the Range is not the custom arrays or Dim AllElements As the Variant
Ace to give directions
CodePudding user response:
Ashamed of myself, after I sent, just discover oneself didn't install office on machine, use VBA nor used before this two methods,
There is a small suggestion, just put your problem description to tidy it up again, had better with some screenshots, so to a better understanding on the issue, but also not very familiar with the Internet, understand what I mean when you will be much easier,
CodePudding user response:
I think this is decided by the object itself!
Those "chart" object, it is only to source data from the worksheet, the type of data source for naturally "Range" type of object, If you want to use variables, if the variable (variable type is the Range or the Variant) Range "value" is to meet the requirements of object, should be! If the parameter value is a simple array, certainly not,
CodePudding user response:
You again SetSourceData \ definition, you can see
Sub SetSourceData (Source As Range, [PlotBy])
The parameters of the type of Source is Range! What's the problem clearly!