LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Brian Elliott
 
Posts: n/a
Default Scatter plot - macro OK - VB 6 not OK

If I have 2 rows of data, say, A1 to C1 and A2 to C2 and record a macro :-

Charts Add
ActiveChart.ChartType = xlXYScatter
ActiveChart.SetSourceData Source := Sheets ( " Sheet1 " ).Range ( " A1 : C2
" ), plotby := xlrows

This works - I get 3 pairs of co-ordinates in a graph.

When I use the equivalent code in a VB6 program :-

Set ch = wbook1.Charts.Add

With ch

..ChartType = xlXYScatter

..ChartWizard Source := wsheet1.Range ( " A1 : C2 " ) , plotby := xlRows

End With

I get SIX separate points , 2 at x axis co-ordinate 1 , 2 more at x=2 etc.

I have tried xlColumns, leaving the plotby out etc. but I am missing
something very obvious I think.

Any suggestions please.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple scatter graphes how to plot 3 sets of data for x y on th. frances Charts and Charting in Excel 3 May 2nd 23 11:42 AM
how to add data points to a scatter plot with trend line Samantha Charts and Charting in Excel 3 April 3rd 23 04:16 PM
Can I use xy scatter charts to plot absolute measurements? Wattie Charts and Charting in Excel 0 February 6th 05 03:29 PM
BUG?: Excel scatter chart: will not plot x-values Bob Excel Discussion (Misc queries) 2 December 31st 04 12:19 AM
Fill area beneath a scatter plot JZip Charts and Charting in Excel 4 December 8th 04 01:59 PM


All times are GMT +1. The time now is 11:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"