Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need a macro that will open up a directory, not a file. The directory's
full address is on a sheet in the same file where the button is. I am using mainly Excel 5 files although occasionally I use the Excel 2002 version if it absolutely necessary. Any help would be greatly appreciated, Roger |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Open a directory is pretty meaningless.
Do you want to open every file in a directory? Dim fName as String fname = Dir("C:\Myfolder\*.xls") do while fname < "" workbooks.Open("C:\MyFolder\" & fname) fName = Dir() Loop -- Regards, Tom Ogilvy "Roger B." wrote in message ... I need a macro that will open up a directory, not a file. The directory's full address is on a sheet in the same file where the button is. I am using mainly Excel 5 files although occasionally I use the Excel 2002 version if it absolutely necessary. Any help would be greatly appreciated, Roger |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Roger,
What does "open a directory" mean? Do you want to allow a user to select a directory from a dialog box? If so, see http://www.cpearson.com/excel/BrowseFolder.htm . If not, you need to be much more specific in your post. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Roger B." wrote in message ... I need a macro that will open up a directory, not a file. The directory's full address is on a sheet in the same file where the button is. I am using mainly Excel 5 files although occasionally I use the Excel 2002 version if it absolutely necessary. Any help would be greatly appreciated, Roger |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom and Chip for your suggestions. Tom I have kept yours for other
uses. The reason that I want the macro to only open the directory and no more is either because I have a lot of backups of a file that I am creating and want to easily go back to earlier files or because there are several files that I know are in a directory and I can easily choose then which one I want. Many thanks, Roger "Chip Pearson" wrote in message ... Roger, What does "open a directory" mean? Do you want to allow a user to select a directory from a dialog box? If so, see http://www.cpearson.com/excel/BrowseFolder.htm . If not, you need to be much more specific in your post. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Roger B." wrote in message ... I need a macro that will open up a directory, not a file. The directory's full address is on a sheet in the same file where the button is. I am using mainly Excel 5 files although occasionally I use the Excel 2002 version if it absolutely necessary. Any help would be greatly appreciated, Roger |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
open all files in directory | Excel Discussion (Misc queries) | |||
open in old directory save in new directory | Excel Programming | |||
Open a new Directory | Excel Programming | |||
Open files in directory | Excel Programming | |||
Open all files in a directory | Excel Programming |