open excel file

I need to open an existing excel file using a coded vb commandbutton. every code i have tried doesn't work. I can open excel and create a new workbook but I can't open an existing file. PLEASE HELP
steffeyAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
avitalkConnect With a Mentor Commented:
how's this working ?

Dim strFileName As String
Dim AppExcel As Excel.Application
Dim Wb As Excel.Workbook

strFileName = App.Path & "\multiple.xls"
If Dir(strFileName) = "" Then Exit Sub

Set AppExcel = CreateObject("Excel.Application")
Set Wb = AppExcel.Workbooks.Add(strFileName)

AppExcel.Visible = True
Set Wb = Nothing
Set AppExcel = Nothing
0
All Courses

From novice to tech pro — start learning today.