Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 31st, 2005, 12:55 PM
Registered User
 
Join Date: Oct 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating a trend graph

Hi
I'm creating a regular trend graph from the values in an excel file for contiguous columns as follows:
    Charts.Add
    ActiveChart.ChartType = xlLineMarkers
    ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range(Sheets("Sheet1").Ce lls(7, 1), Sheets("Sheet1").Cells(Sheets("Sheet1").UsedRange. Rows.Count, Sheets("Sheet1").UsedRange.Columns.Count)), PlotBy:= _
        xlRows

Can anyone please help me in plotting the graph where the values should be taken of only columns 1, 4, 7, etc. and all columns will have the same number of rows. Please tell me how should i modify the code accordingly
Thanks a lot in advance

 
Old November 3rd, 2005, 01:27 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default

Hi

The easiest way to do these things is to use the "Record Macro" Feature in excel. Press record, create the graph the way you would want it and then access the module from your Excel VB Editor. Copy the code to your VB6 project...

Hope this helps...lemme know if you need more info.

Regards
Marnus





Similar Threads
Thread Thread Starter Forum Replies Last Post
Graph Problems ryan_goal C++ Programming 0 October 7th, 2006 03:08 AM
UPDATE: Can't see my graph inge_03 Crystal Reports 0 March 20th, 2006 11:44 AM
graph pab006 Classic ASP Basics 5 July 26th, 2004 10:06 AM
graph pab006 Classic ASP Basics 1 April 30th, 2004 10:08 PM
Stacking Chart with Rolling Totals and Trend Line smartgir Excel VBA 0 March 9th, 2004 06:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.