vba - How to open an Excel file from MS Access? -
i trying open excel file, in ms acesss, select using filedialogfilepicker
. however, when select excel file "open" prompt turns "ok" , unable open it. know how solve problem? below working code selects file.
dim f filedialog set f = application.filedialog(msofiledialogfilepicker) f.show
thank you!
below final code:
dim f filedialog, str string set f = application.filedialog(msofiledialogfilepicker) f.show str = f.selecteditems(1) dim xl excel.application set xl = new excel.application xl.visible = true xl.workbooks.open (str)
Comments
Post a Comment