![]() |
Opening then later Closing an Excel file in VBA
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 |
Opening then later Closing an Excel file in VBA
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 |
All times are GMT +1. The time now is 06:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com