open excel through user browsing?

enigmajl

New member
Local time
Today, 15:12
Joined
Aug 6, 2004
Messages
8
with a command button, i m aiming to open up a csv file in excel. make the necessary changes to it and then import the data into access

my code to open .csv in excel is as follows.

Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
Set wb = oApp.Workbooks.Open("C:\WORK\Software Audit\sample.csv")
Set ws = wb.ActiveSheet

I would like to ask if there is a way to let the users browse and decide which file to open instead of specifying the path.
In addition. i would also like to keep the path as a string for importing.

How do i go about doing that?
i tried oApp.FindFile but it doesnt return a workbook
not too sure how to use that.
please help! thanks in advance! :)
 
Thanks Wayne!

i'll go try it out. :)
 

Users who are viewing this thread

Back
Top Bottom