piowtrpolo
Programmer
I am new to VB6 and need some quick help. Well I hope this isn't to hard to do. All I need the program to do is open an excel file I already have on my desktop. I have a program already that opens a new excel file every time, but I don't need that. Also if possible I would like it to start on sheet 2 instead of sheet 1. I'll post the code I have. Please tell me if it has to be redone in order for this to work. Thank you.
Option Explicit
'Variables for Excel
'Microsoft Excel 9.0 Object Library
Dim exlApp As Excel.Application
Dim exlWSheet As Object
Dim exlRow As Integer
Dim exlCol As Integer
Dim strExcelPath As String
Private Sub Form_Load()
'Start Excel and open new spreadsheet
Set exlApp = New Excel.Application
exlApp.Workbooks.Add
Set exlWSheet = exlApp.Workbooks(2).Worksheets(1)
exlApp.Visible = True
exlRow = 1
exlCol = 1
End Sub
Option Explicit
'Variables for Excel
'Microsoft Excel 9.0 Object Library
Dim exlApp As Excel.Application
Dim exlWSheet As Object
Dim exlRow As Integer
Dim exlCol As Integer
Dim strExcelPath As String
Private Sub Form_Load()
'Start Excel and open new spreadsheet
Set exlApp = New Excel.Application
exlApp.Workbooks.Add
Set exlWSheet = exlApp.Workbooks(2).Worksheets(1)
exlApp.Visible = True
exlRow = 1
exlCol = 1
End Sub