Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB in MS Excel - Filebrowse option

Status
Not open for further replies.

DannyAuber

Programmer
Feb 4, 2003
6
GB
I'm writing some VB in Excel
I want to prompt the user for a filename, so I want an Inputbox with a "Browse" option where they can browse to a file, and then hit OK - the inputbox will then return the path and file

No idea how to do it - doesn't seem to be a feature of inputbox.

Can someone help ?

thanks in advance

dan
 
Have you tried the GetOpenFileName API?

The GetOpenFileName creates a common dialog box for a user to pick a drive, directory, and filename. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Hi
I don't usually post here but if you're coding in Excel then the vba command exists to do what you want ie
Code:
Application.Dialogs(xlDialogOpen).Show "C:\My Documents\Wherever\Excel"

The path shown is a filter basically identifying the first folder you see. using "*.*" will default to all files in the current directory.

;-) If a man says something and there are no women there to hear him, is he still wrong? [ponder]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top