Opening then later Closing an Excel file in VBA>

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

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.
 
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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top