I have a program that creates an Excel spreadsheet and creates a line graph on the spreadsheet. It works great except I need to add another line to the graph. How do I do that? Here is the code I use to create everything:
VB Code:
Dim objExcel As Excel.Application Dim objWorkBook As Excel.Workbook Dim objWorkSheet As Excel.Worksheet Dim objXLRange As Excel.Range Dim objXLChart As Excel.Chart Set objExcel = CreateObject("Excel.Application") Set objWorkBook = objExcel.Workbooks.Add Set objWorkSheet = objWorkBook.Worksheets(1) Set objXLRange = objWorkSheet.Range("E2", RangeX) Set objXLChart = objWorkSheet.Application.Charts.Add With objXLChart .ChartType = xlLine .SetSourceData objXLRange, xlColumns End With
This is not all the code understand, just enough to let you know how I am doing it all.
