|
-
Nov 2nd, 2000, 10:18 PM
#1
O has already been set up as a excel.application
I keep getting errors with this...
I created it in the macro of Excel but need it to work in VB
O.Charts.Add
O.ActiveChart.ChartType = xlLine <-ERROR
O.ActiveChart.SetSourceData Source:=O.Sheets("MarketSmart").Range("F1:G" & MScr), PlotBy:=xlColumns
O.ActiveChart.Location here:=xlLocationAsNewSheet, Name:="MS Chart" <-ERROR
With O.ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "MarketSmart"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Date"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Defects"
End With
O.ActiveChart.HasDataTable = False
HELP!!!!!!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Nov 3rd, 2000, 10:15 AM
#2
Hyperactive Member
What´s the error?
When working with Excel, you´ll have to declare all the constants that are involved. Execute the macro step by step and look for the constants and their value. I used to declare all the constants that I need in a module.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|