0

I'm opening excel files from a application form. I have a personal.xlsb file that is loaded when any excel files is opened located in C:\Users\"myusername"\AppData\Roaming\Microsoft\Excel\XLSTART\personal.xlsb. Problem is, if I open excel directly, personal.xlsb will load, if I open it from the application, the personal.xlsb will not load. Any ideas? Here's how I'm opening excel from the app-

1st way of opening excel from app:

Public xlsApp As Object
Public xlsWB As Excel.Workbook

Public sub openExcelFile()
    Try
       xlsApp = CreateObject("Excel.Application")
       xlsApp.Visible = True
       xlsWB = xlsApp.Workbooks.Open("C:\myExcelFile.xlsm)
    Catch ex As Exception
       msgbox(ex)
    End Try
End Sub

2nd way of opening excel from app:

Public sub openExcelFile2()
   System.Diagnostics.Process.Start("C:\myExcelFile.xlsm")
End Sub

0 Answers0