Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Open find file dialog multiple files

When opening multiple files with the find file dialog (can't re,ber exact
dialog as on wrong computer). The only problem i get is I am wanting to selct
around 200-300 files to work on. The method i have works fine for about 20
files but any more than that and the string it stores the files as gets to
big. I was wondering if anyone had ideas to a way around this or to get the
dialog to store it as an array from the start. Any soultion either for ofiice
2003 or office 97 would be great help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Open find file dialog multiple files

WOW 200 - 300 files... what the heck are you working on?? :o)

In tha past I have used a list of file names in a worksheet (as the files
stay the same each time).
Then I run a macro which loops through the list and opens the file. So each
time you are opening one one file at a time.
That way you don't run out of space in your filename string.

Nick

"Magius00" wrote in message
...
When opening multiple files with the find file dialog (can't re,ber exact
dialog as on wrong computer). The only problem i get is I am wanting to
selct
around 200-300 files to work on. The method i have works fine for about 20
files but any more than that and the string it stores the files as gets to
big. I was wondering if anyone had ideas to a way around this or to get
the
dialog to store it as an array from the start. Any soultion either for
ofiice
2003 or office 97 would be great help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Open find file dialog multiple files

Aye have been thinking along the same lines. What i'm working on is the data
from a system called ip accounting it makes a text file every 5 mins with
what ip address's. As you can imagine it makes a lot of files over 24 hours
(288).

As the user needs to be able to browse to the files as the name's change a
lot i was wondering if there was anyway to keep this as a string or array
within the Code but if i can get it to cyccle through whats in the folder and
add the file name which can then be used to generate thew file details i'll
give it a go.

Of course if anyone has any other ideas on how to do this i'd be very
greatful.

"Nick" wrote:

WOW 200 - 300 files... what the heck are you working on?? :o)

In tha past I have used a list of file names in a worksheet (as the files
stay the same each time).
Then I run a macro which loops through the list and opens the file. So each
time you are opening one one file at a time.
That way you don't run out of space in your filename string.

Nick

"Magius00" wrote in message
...
When opening multiple files with the find file dialog (can't re,ber exact
dialog as on wrong computer). The only problem i get is I am wanting to
selct
around 200-300 files to work on. The method i have works fine for about 20
files but any more than that and the string it stores the files as gets to
big. I was wondering if anyone had ideas to a way around this or to get
the
dialog to store it as an array from the start. Any soultion either for
ofiice
2003 or office 97 would be great help.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Open find file dialog multiple files

If you want to open all of the files in a specified directory you can use
the Dir function.

You can loop until the Dir function returns an empty string. For example

dim strFile as string

strFile = Dir(c:\temp\*.txt) ' Returns the first .txt file in the
directory

do while strFile <"" ' Do until an empty string is returned - last file
retrieved
Workbooks.Open strFile
strFile = Dir ' Not specifying any arguments returns the next .txt
file in the directory
loop

The files are not retrieved in any particular order so if you want them
opened in a particular order save the names to a range or an array and sort
them accordingly.

I hope this helps.


Nick

"Magius00" wrote in message
...
Aye have been thinking along the same lines. What i'm working on is the
data
from a system called ip accounting it makes a text file every 5 mins with
what ip address's. As you can imagine it makes a lot of files over 24
hours
(288).

As the user needs to be able to browse to the files as the name's change a
lot i was wondering if there was anyway to keep this as a string or array
within the Code but if i can get it to cyccle through whats in the folder
and
add the file name which can then be used to generate thew file details
i'll
give it a go.

Of course if anyone has any other ideas on how to do this i'd be very
greatful.

"Nick" wrote:

WOW 200 - 300 files... what the heck are you working on?? :o)

In tha past I have used a list of file names in a worksheet (as the files
stay the same each time).
Then I run a macro which loops through the list and opens the file. So
each
time you are opening one one file at a time.
That way you don't run out of space in your filename string.

Nick

"Magius00" wrote in message
...
When opening multiple files with the find file dialog (can't re,ber
exact
dialog as on wrong computer). The only problem i get is I am wanting to
selct
around 200-300 files to work on. The method i have works fine for about
20
files but any more than that and the string it stores the files as gets
to
big. I was wondering if anyone had ideas to a way around this or to get
the
dialog to store it as an array from the start. Any soultion either for
ofiice
2003 or office 97 would be great help.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Open find file dialog multiple files

Do you know the only really stupid thing. I've only just relaised i can put
an array in there. i've beeing using a similar bit of code to open them all
but never thought of just using an artray while opening them like that. I now
feal so stupid it's almost sickening. Still if only i could now find a way
past the hard coded date format in text strings (csv files) for dates in
excel 2003 i'd be happy.

Thanks very much Nick .. now to go play WoW as it's finaly arrived here at
home.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Open find file dialog multiple files

Yes an array can be used, never really thought of that myself either.

You are going to play what?? WoW what's that?
Nick
"Magius00" wrote in message
...
Do you know the only really stupid thing. I've only just relaised i can
put
an array in there. i've beeing using a similar bit of code to open them
all
but never thought of just using an artray while opening them like that. I
now
feal so stupid it's almost sickening. Still if only i could now find a way
past the hard coded date format in text strings (csv files) for dates in
excel 2003 i'd be happy.

Thanks very much Nick .. now to go play WoW as it's finaly arrived here at
home.



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
Open Dialog Box to return Selected File Path and Not Open it. DMS Excel Programming 4 January 26th 10 12:46 PM
Open Find Dialog at WorkbookOpen Rob Excel Discussion (Misc queries) 3 September 22nd 09 06:56 AM
Open Dialog Box in Excel 2007 Scrolls Past Files Bob Gutjahr Excel Discussion (Misc queries) 0 August 18th 07 01:38 PM
How can I make the find dialog box appear as soon as I open a spr. christieb1975 Excel Discussion (Misc queries) 2 January 28th 05 06:47 PM
open file dialog-select file-import worksheet Divinedar Excel Programming 1 January 16th 04 07:13 PM


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