R
rci
Hi all...
not new to programming, but I'm rather old school... back when line numbers
were in vogue ;-)
Anyway, this newfangled object stuff sometimes throws me.
So here I am... trying to make the Microsoft Office Chart Component work
from within an Excel Userform. Don't try to talk me out of it
Anywhoo... I am having success, but am at an impasse...
I need to set the DataSource for the chartspace to a spreadsheet object.
Some Microsoft example code says I should be able to do it, but as yet, I am
always getting a "type mismatch error" whenever I come to this line:
Set ChartSpace1.DataSource = Spreadsheet1
or
Set ChartSpace1.DataSource = ActiveSheet
or
...
or
...
or
... any of the numerous variations I've tried to point to the
spreadsheet I am using (in the same project as the userform).
Apparently, the object that Chartspace1 needs as a datasource is not the
same type of object as the excel spreadsheet... or perhaps I'm not doing it
right syntactically.
I'm Using Excel 2002...
If anyone could tell me how to set the datasource to my active sheet, I'll
buy you a beer.
All the best,
Mike
not new to programming, but I'm rather old school... back when line numbers
were in vogue ;-)
Anyway, this newfangled object stuff sometimes throws me.
So here I am... trying to make the Microsoft Office Chart Component work
from within an Excel Userform. Don't try to talk me out of it
Anywhoo... I am having success, but am at an impasse...
I need to set the DataSource for the chartspace to a spreadsheet object.
Some Microsoft example code says I should be able to do it, but as yet, I am
always getting a "type mismatch error" whenever I come to this line:
Set ChartSpace1.DataSource = Spreadsheet1
or
Set ChartSpace1.DataSource = ActiveSheet
or
...
or
...
or
... any of the numerous variations I've tried to point to the
spreadsheet I am using (in the same project as the userform).
Apparently, the object that Chartspace1 needs as a datasource is not the
same type of object as the excel spreadsheet... or perhaps I'm not doing it
right syntactically.
I'm Using Excel 2002...
If anyone could tell me how to set the datasource to my active sheet, I'll
buy you a beer.
All the best,
Mike