Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I do this autoselect with GetOpenFileName or the Dir function?
I have an application that is semi-automated in that to kick it off I use the
GetOpenFileName method to allow the user (me) to select 51 files for processing. There are always 51 files, always with the extension ".txt", and always arranged in descending order by date of creation. Right now I open the dialog box, which has the .txt filter active, arrange in descending order by date, highlight, hold down the shift key & count down the 51 files as I hit the down arrow key. I was wondering if there is some way to automate that part of it using the "dir" function. The procedure is always the same. I don't really have to open the dialog box, because the files to be processed always reside in the same place. Thank You, -plh -- Where are we going and why am I in this HAND BASKET?? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I do this autoselect with GetOpenFileName or the Dir function?
Sub test_SFO() Dim FSO As Object Dim F Dim Fo Dim s As String Set FSO = CreateObject("Scripting.FileSystemObject") s = "D:\Documents and Settings\mensar\Documenti\lavoro\prove excel2" If FSO.FolderExists(s) Then Set Fo = FSO.GetFolder(s) For Each F In Fo.Files Debug.Print F.Name Debug.Print F.Type Next End If End Sub regards r Il mio ultimo lavoro ... http://excelvba.altervista.org/blog/...ternative.html "plh" wrote: I have an application that is semi-automated in that to kick it off I use the GetOpenFileName method to allow the user (me) to select 51 files for processing. There are always 51 files, always with the extension ".txt", and always arranged in descending order by date of creation. Right now I open the dialog box, which has the .txt filter active, arrange in descending order by date, highlight, hold down the shift key & count down the 51 files as I hit the down arrow key. I was wondering if there is some way to automate that part of it using the "dir" function. The procedure is always the same. I don't really have to open the dialog box, because the files to be processed always reside in the same place. Thank You, -plh -- Where are we going and why am I in this HAND BASKET?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
AutoSelect? in Drop Down List Box | Excel Worksheet Functions | |||
Autoselect data using Macros | Excel Programming | |||
GetOpenFileName help | Excel Programming | |||
GetOpenFilename | Excel Programming | |||
VBA Autoselect problem | Excel Programming |