Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue: Chart.SetDataSource method from Access

Status
Not open for further replies.

Deefa

Programmer
Jan 8, 2002
4
AU
Hello All,

I have done a quick search on "setsourcedata", and found nothing, so I will post in the hope that an expert can assist.

breif history: Writing a little database (to report on call centre operator statistics) that imports some (nastily formatted) csv files, creates users + a table of their data.
I am trying to create a simple chart in Excel (after deciding that MS Graph should be left for somebody else).

I can create the worksheet (Createobject("Excel.sheet"))
add data to cells, (.activesheet.cells)
I can create the graph, (activesheet.chartobjects.Add)
All this is fine, the data appears in Excel, the (empty) graph appears, but I get a "Type mismatch" when trying to use the SetSourceData method to define the data series for he graph.

The required data type (according to Excel VBA help) is "range", which is not a default in Access VBA. I have searched the online rhelp for any info that may describe how the Range data type is created, with no luck.

Can anybody assist, I have managed to do a lot more than I thought I could (with 7 years off programming) but I'm stuck here.

thanks for any help,

Deefa.

ps. I now have a book to squiz at, If I find a solution, I'll post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top