Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
OS: MS XP, Excel 2003
In VBA I need to be able to Open and when finished Close an Excel File. There are several files in my folder. Folder is named Thom Drive. All the file names start with 01, 02, and 03 Etc... They reference the weeks in a year. The 1st two (2) positions in the file name are unique. How would I go about this using VBA? .. Thanks in advanced. -- Richard |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Apr 22, 7:45*am, Richard wrote:
OS: MS XP, Excel 2003 In VBA I need to be able to Open and when finished Close an Excel File. * * * * There are several files in my folder. *Folder is named Thom Drive. * * * * All the file names start with 01, 02, and 03 Etc... *They reference the weeks in a year. The 1st two (2) positions in the file name are unique. How would I go about this using VBA? . Thanks in advanced. -- Richard Dick, Here is how you open and close a file in VB. Hopefully this will get you on your way. Sub OpenThenClose() Workbooks.Open Filename:="G:\DPE-IPE\DPE REVISIONS\All Press Ips.xls" 'First you need to know where the file is located and the name 'Do your code as it were open Workbooks.Close Filename:="G:\DPE-IPE\DPE REVISIONS\All Press Ips.xls" End Sub Jay |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom message at opening or closing of file | Excel Discussion (Misc queries) | |||
Opening and Closing a "EXE" file within Excel | Excel Discussion (Misc queries) | |||
Excel 2003/2007 Crash when opening/closing files | Excel Discussion (Misc queries) | |||
Error while opening/Closing excel | Excel Discussion (Misc queries) | |||
Excel 2003 calculates new on closing/opening outlines | Excel Discussion (Misc queries) |