Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK 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
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?
 
Replies continue below

Recommended for you

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