Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Choose particular files from a directory
Hello,
Per the below, I'm trying to manipulate certain files within a directory. As you can see in the last line, I am unsuccessfully trying to choose all files in the directory entitled "Region***", as well as two specific files ("ABC.xls", "DEF.xls"). It works with just the Region, but not sure how to get the syntax right to get the last two as well..... TIA! Dim basebook As Workbook Dim mybook As Workbook Dim sourceRange As Range Dim destrange As Range Dim rnum As Long Dim SourceRcount As Long Dim FNames As String Dim MyPath As String Dim SaveDriveDir As String SaveDriveDir = CurDir MyPath = "Y:\Sales\2005" ChDrive MyPath ChDir MyPath FNames = Array(Dir("REGION***.xls"), "ABC.xls", "DEF.xls") |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
List of Files in A Directory | Excel Discussion (Misc queries) | |||
Files in a directory? | Excel Discussion (Misc queries) | |||
Load all files in a directory | Excel Discussion (Misc queries) | |||
Check if directory empty OR no of files in directory. | Excel Programming | |||
Open all files in a directory | Excel Programming |