msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

change data range of excel chart from vb

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE
Author Message
ColinMuir



Joined: 04 Oct 2007
Posts: 1

PostPosted: Wed Feb 14, 2007 6:24 am    Post subject: change data range of excel chart from vb Reply with quote

Hi,

I've created an VB6 App with a OLE Excel Chart object embedded. I'm
trying to change the datarange of the chart. I need help!!!!

This is my code:

Dim wb As Excel.Workbook

set wb = Me.oleCVAverages.object 'This is the OLE Excel chart

With wb
.Sheets("Chart1").Activate
.Sheets("Chart1").Select
.ActiveChart.PlotArea.Select
.ActiveChart.SetSourceData
Source:=Sheets("Sheet1").Range("B2:B17"), PlotBy:=xlColumns
End With

I receive the following error: Select Method of Chart class failed.
This error is on the line: .Sheets("Chart1").Select

Another error I recieve regular is: Select Method of Walls class
failed

Please Help

Thanks

Colin

Archived from group: microsoft>public>vb>ole
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Excel chart from VB to Excel Hi I've a Chart object in a VB6 form together with some text boxes, my question is can I "copy" the chart object from the form and place it in a Excel chart ?? I know I can create the chart in a Excel my question is can I

Insert Excel Data in Word document? Hi, I have a Word document with, among other texts, some tags. To each tag is associated a cell in an Excel sheet.(I might as well use the Excel cell naming convention as tags, ex : B3, H17, etc..) I would like to write a visual basic app to do the follow

using MSGraph.Chart.8 in vb very urgent, I need to be able to update also called Microsoft Graph 2000 in visual basic. All of my efforts have failed. I've searched the internet and found some references to using the properties, but VB just gives me e

MSGraph.Chart OLE I have taken over a dll that uses an OLE to display data. After being distributed to clients, a handful have reported errors with the dll. I have found that the error occurs when trying to reference the chart in the dll. Since it only h

replace Excel 2000 -> Excel 2003 I am using the following code to edit data cell by cell: What:="", I get a Microsoft error "Microsoft Excel cannot find any data to replace. Check if your search formatting and criteria are defined correctly. I
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group