I am trying to call an Excel chart from VB. This is some of the code:
Public xlApp As Excel.Application
Public xlBook As Excel.Workbook
Public xlSheet As Excel.Worksheet
Public xlRows As Integer
Private Sub Form_Load()

Set xlApp = New Excel.Application
Set xlBook = xlApp.Workbooks.Open(App.Path & "Book1.xls", , True)
Set xlSheet = xlBook.Worksheets("Charts")

XLChart xlSheet

End Sub

Sub XLChart(xlSheet As Excel.Worksheet)

    Set CurrentChart = xlSheet.ChartObjects(j).Chart

End Sub
The problem is with the "Set CurrentChart". I get an error message that the Method ChartObjects failed. Any ideas what I'm doing wrong?

[ This Message was edited by: Skippy on 2002-05-03 10:41 ]