Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default opening files

Brian,

What you need is the GetOpenFileName function.

Use it like

TheFileToOpen = Application.GetOpenFileName

TheFileToOpen will contain a string
Look in the help menu as you can use filters with it (among other things)
(ie only look for xls or txt files)
OpenWhat = Application.GetOpenFilename("Microsoft Excel Spreadsheets (*.xls), *.xls")

Dan E

"Brian" wrote in message ...
How do I write the VBA code to prompt the user to select a
file to open? In other words, I want the code to make
the Excel 'Open' window appear in order for the user to
browse for the appropriate file to open.

Thanks in advance!

Brian



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
show most recent files first when opening excel files Anne` Excel Discussion (Misc queries) 5 January 23rd 08 01:54 AM
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 PoundMutt Excel Discussion (Misc queries) 1 June 20th 07 03:50 AM
How can I view files chronologically when opening multiple files Stevilsize Excel Discussion (Misc queries) 3 July 26th 05 12:49 AM
Opening Files with the Same Name MB Excel Discussion (Misc queries) 2 February 24th 05 11:41 PM
Opening files Dave Peterson[_3_] Excel Programming 0 August 14th 03 03:35 AM


All times are GMT +1. The time now is 11:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"