Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to open excel files

Status
Not open for further replies.

piowtrpolo

Mechanical
Joined
May 23, 2008
Messages
1
Location
US
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?
 
This appears to have been comprehensively answered in your similar post on our sister site Tek-Tips, although you haven't yet acknowledged the answers given there.

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting
Steam Engine enthusiasts
Steam Engine Prints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top