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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Dialogs

Status
Not open for further replies.

bujin

MIS
Oct 2, 2000
144
GB
Hi

I'm writing a small program to automate a task in Excel (using VBA). I've got it to do everything else that I want it to do (formatting cells, adding and deleting cells, etc) but I can't figure out how to use the Open dialog box to load a file. The help file is no use whatsoever - it just tells me how to return true or false depending on what's clicked in the dialog box, but not how to actually return the filename or load the file.

I'd appreciate a bit of help with this matter.

Thanks
 
Excel 2000 :

To create a macro (OpenDialog) that will start the Open dialog box, use the following Visual Basic sample code:

Sub OpenDialog()
Application.Dialogs(xlDialogOpen).Show
End Sub
Eric De Decker
vbg.be@vbgroup.nl

Licence And Copy Protection AxtiveX.

Download Demo version on my Site:
Promotions before 02/28/2001 (free source codebook),visite my site
 
Thanks, but I want to actually return the filename of the file selected in the Open Dialog box, rather than just True or False.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top