piowtrpolo
Mechanical
- May 23, 2008
- 1
I got this program from a coworker but it only opens a new excel file. I want to change the code so it opens an excel file of my choosing. I'm not sure how to put this in a code format, but here it is.
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
All of the exl**** is already set. I'm just unsure how to make the program open the excel file I want instead of start a new file. Do I have to drastically change the file?
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
All of the exl**** is already set. I'm just unsure how to make the program open the excel file I want instead of start a new file. Do I have to drastically change the file?