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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need VB5 help with Excel Chart

Status
Not open for further replies.

BrooksR

Programmer
Feb 24, 2001
98
US
Hi,

I'm trying to duplicate in VB5 code from Excel 2000 for working with a stock chart.

In Excel VBA, to set a chart type it is:

ActiveChart.ChartType = xlStockOHLC

In VB5, I added the Excel Chart using the OLE object tool. The object is: OLE1, so I tried:

OLE1.ChartType = xlStockOHLC

but I get a "Method or Data Member Not Found" on the ChartType method.

Its been a long time since I've done coding like this. Any help appreciated.

Thanks,
Brooks



 
Basically, you need to use the Excel object library. The OLE object tool is really more for embedding some visual aspect of an application in a VB form. You don't need to do that, as far as I can see.

Putting the string
site: "new excel.application"
in google yields many threads in this forum on the subject, including which will give you a basic overview.

HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top