Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Graig;
I was given this program open an excel file (see below). The only thing you have to do is put everything under one directory. Maperalia '*********Start Program Open Excel File**************** Sub OpenExcelFile() directory = ThisWorkbook.path & "\" filetext = Selection.Value & ".xls" If filetext = ".xls" Then MsgBox "Please select a File" Exit Sub End If Workbooks.Open directory & filetext End Sub '*********End of Program Open Excel File**************** "Ron de Bruin" wrote: Hi Graig See this example http://www.rondebruin.nl/copy3.htm#range2 -- Regards Ron de Bruin http://www.rondebruin.nl "Craig" wrote in message ups.com... I'm trying to create a macro to open all of the files within a certain folder. For example, it would open all of the .xls files in C:\Timesheets. I'm lost on how to do this. I'm able to get a single file open if I have the file name, but the file names are going to vary. Also is it possible to only open certain files within a specific folder based on parameters of the filename (like all files starting with 07*****.xls)? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you set Excel 2007 to open files in a specific folder? | Excel Discussion (Misc queries) | |||
can't open excel files from common folder | Excel Discussion (Misc queries) | |||
Can't Open Certain Excel Files in Folder | Excel Discussion (Misc queries) | |||
Open Excel files in a folder | Excel Programming | |||
Open Excel files in a folder | Excel Programming |