Generating Charts in Excel through VB
Generating Charts in Excel through VB
Generating Charts in Excel through VB
Generating Charts in Excel through VB
Generating Charts in Excel through VB
Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB
Generating Charts in Excel through VB Generating Charts in Excel through VB
Generating Charts in Excel through VB
Go Back  Xtreme Visual Basic Talk > > > Generating Charts in Excel through VB


Reply
 
Thread Tools Display Modes
  #41  
Old 07-02-2004, 04:25 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default


Whoo-hoo! That feels good, right?

Quote:
Originally Posted by Stacey244
Edit: One last thing, is there a way to save the graphs as a .jpg or something that I can throw into a picture box. It sounds way too easy so Im thinking no but I figured I might as well ask.
My Excel is still sort of inoperable at the moment, so I can't really test this out, but you should lookup help under Chart.CopyPicture(). If you wish to save it as a Graphic file, then look up help for Chart.Export(). Sorry I can't help more, but my Excel really is on the fritz. But I do think that the help files on these should make it pretty clear...

,
Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #42  
Old 07-06-2004, 12:17 PM
Stacey244 Stacey244 is offline
Regular
 
Join Date: Jun 2004
Location: Michigan
Posts: 74
Default

Thanks Mike, I found that this code works just fine to import the pic
Code:
ochart.Export( _ FileName:="DADN.jpg", FilterName:="JPG") ochart2.Export( _ FileName:="SN.jpg", FilterName:="JPG")

It automatically puts it in your documents and settings folder, but you can change that as you go along. And then to put it in the picturebox
Code:
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Documents and Settings\ME457Lab\My Documents\DADN.jpg") ' Set the SizeMode property to the StretchImage value. This ' will shrink or enlarge the image as needed to fit into ' the PictureBox. Me.PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage PictureBox1.Visible = True PictureBox2.Image = System.Drawing.Image.FromFile("C:\Documents and Settings\ME457Lab\My Documents\SN.jpg") Me.PictureBox2.SizeMode = PictureBoxSizeMode.StretchImage PictureBox2.Visible = True

Thanks!
__________________
~Stacey~

All the world's a stage and all the men and women merely players...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Generating Charts in Excel through VB
Generating Charts in Excel through VB
Generating Charts in Excel through VB Generating Charts in Excel through VB
Generating Charts in Excel through VB
Generating Charts in Excel through VB
Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB Generating Charts in Excel through VB
Generating Charts in Excel through VB
Generating Charts in Excel through VB
 
Generating Charts in Excel through VB
Generating Charts in Excel through VB
 
-->