Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Get all files from folder

I want to open all files in a folder but do not want to use input box. Is
there a way of using something like the open files window (which pops open if
you click File - Open menu in excel)?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Get all files from folder

Try tis code:

Dim Fname As Variant

Fname = Application.GetOpenFilename("Excel Files (*.xls),*.xls", 3, "Select
a File to Open" ,, True)
If Not IsArray(Fname) Then
MsgBox "No file was selected."
Exit Sub
End If
For i = LBound(Fname) To UBound(Fname)
msg = msg & Fname(i) & vbCrLf ' This can be removed
Workbooks.Open Fname(i)
Next i
......
.....
exit sub



"linglc" wrote:

I want to open all files in a folder but do not want to use input box. Is
there a way of using something like the open files window (which pops open if
you click File - Open menu in excel)?

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
Pulling pdf files from general folder to specific folder [email protected] Excel Discussion (Misc queries) 2 September 8th 09 09:41 PM
Copying all files in a folder to new folder michaelberrier Excel Discussion (Misc queries) 2 June 20th 06 05:35 AM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven Excel Discussion (Misc queries) 1 January 24th 06 03:28 PM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven[_2_] Excel Programming 1 January 24th 06 04:23 AM
How to copy 30 csv files from a folder to another folder ddiicc Excel Programming 1 July 17th 05 09:42 AM


All times are GMT +1. The time now is 10:06 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"