ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I set up a form to select files from (https://www.excelbanter.com/excel-programming/358539-how-do-i-set-up-form-select-files.html)

greaseman[_5_]

How do I set up a form to select files from
 

In Excel VBA, I want to set up a small form for selecting a file from a
folder full of files. I tried using some VB code I had in another
project and it didn't work.

Any ideas or suggestions out there?

Thanks!!


--
greaseman
------------------------------------------------------------------------
greaseman's Profile: http://www.excelforum.com/member.php...o&userid=28808
View this thread: http://www.excelforum.com/showthread...hreadid=531671


Bob Phillips[_6_]

How do I set up a form to select files from
 
Take a look at GetOpenFilename in VBA Help.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"greaseman" wrote
in message ...

In Excel VBA, I want to set up a small form for selecting a file from a
folder full of files. I tried using some VB code I had in another
project and it didn't work.

Any ideas or suggestions out there?

Thanks!!


--
greaseman
------------------------------------------------------------------------
greaseman's Profile:

http://www.excelforum.com/member.php...o&userid=28808
View this thread: http://www.excelforum.com/showthread...hreadid=531671




Chip Pearson

How do I set up a form to select files from
 
Try code like the following:


Dim FName As Variant
FName = Application.GetOpenFilename("Excel files *.xls,*.xls", ,
"Select A File")
If FName = False Then
' no file selected
Else
MsgBox FName
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"greaseman"
wrote in
message
...

In Excel VBA, I want to set up a small form for selecting a
file from a
folder full of files. I tried using some VB code I had in
another
project and it didn't work.

Any ideas or suggestions out there?

Thanks!!


--
greaseman
------------------------------------------------------------------------
greaseman's Profile:
http://www.excelforum.com/member.php...o&userid=28808
View this thread:
http://www.excelforum.com/showthread...hreadid=531671




greaseman[_6_]

How do I set up a form to select files from
 

And again,

thank you both for your assistance! I'll give your suggestions a try
in the morning, since it's about the end of my work day.

Have a great dat!


--
greaseman
------------------------------------------------------------------------
greaseman's Profile: http://www.excelforum.com/member.php...o&userid=28808
View this thread: http://www.excelforum.com/showthread...hreadid=531671



All times are GMT +1. The time now is 10:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com