Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 7th, 2006, 03:13 PM
Authorized User
 
Join Date: Mar 2004
Location: Atlanta, Ga, USA.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default New keyword Usage

Wrox,
     Can someone tellme why this is invalid?

Dim JPGraphChart As Chart
Set JPGraphChart = New Chart

I have referenced the Graph 11 Library. Chart appears to be a ligitimate class. But I keep getting an "invaid use of New" error.

John P


John Pennington
 
United Parcel Service
w(404) 828 6934
c (770) 714 5975
__________________
John Pennington
 
United Parcel Service
w(404) 828 6934
c (770) 714 5975
Reply With Quote
  #2 (permalink)  
Old August 8th, 2006, 06:51 AM
Authorized User
 
Join Date: Sep 2003
Location: Delhi, Delhi, India.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prabodh_mishra
Default

Graph 11 Library is not creatable. It can only hold already created object. You can use Excel.Chart or word.chart instead.

Reply With Quote
  #3 (permalink)  
Old August 8th, 2006, 09:42 AM
Authorized User
 
Join Date: Mar 2004
Location: Atlanta, Ga, USA.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, still doesn't work.

Dim JPGraphChart As Excel.Chart
Set JPGraphChart = New Excel.Chart

keeps giving me "Class does not support automation or does not support expected interface."

What does it take to create a chart in vb and export it as a file???


John Pennington
 
United Parcel Service
w(404) 828 6934
c (770) 714 5975
Reply With Quote
  #4 (permalink)  
Old August 8th, 2006, 09:53 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

did you try google for the solution??

try this link...

http://www.vb123.com/toolshed/99_vbchart/vbchart1.htm

maybe it will help you...

HTH

Gonzalo
Reply With Quote
  #5 (permalink)  
Old August 8th, 2006, 10:39 PM
Authorized User
 
Join Date: Sep 2003
Location: Delhi, Delhi, India.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prabodh_mishra
Default

    Dim exApp As Excel.Application
    Dim exWb As Excel.Workbook
    Dim JPGraphCharts As Excel.Charts
    Dim JPGraphChart As Excel.Chart

    Set exApp = New Excel.Application
    Set exWb = exApp.Workbooks.Add()

    Set JPGraphChart = Workbooks.Item(1).Charts.Add()
    exApp.Visible = True


Now you have a chart1 in your excel application....

Cheers
Prabodh

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
usage of cdata vsempoux XSLT 1 July 11th, 2008 08:38 AM
about the usage of ant wangpan J2EE 5 June 12th, 2007 06:57 AM
CONTAINS keyword usage caterpillar SQL Server 2000 2 July 12th, 2006 01:19 PM
Software usage rajesh@sonimtech.com C++ Programming 0 October 15th, 2004 06:30 PM



All times are GMT -4. The time now is 02:34 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.