Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open new workbook

Status
Not open for further replies.

phil009

Technical User
Jun 2, 2004
63
US
Hi everybody, sorry but I am a little wet behind the ears when it comes to VBA so I know this question is really easy but my code currently looks like this:
Code:
Workbooks("test.xls").Worksheets("all companies").Cells.ClearContents
  Workbooks("all companies.xls").Worksheets("all companies").[A1].CurrentRegion.Copy _
  Destination:=Workbooks("test.xls").Worksheets("all companies").[A1]
  Workbooks("all companies.xls").Close
  Kill "G:\Finance\2004\Analysis\Compete\CS-54\CS54 Files - Escanaba Excluded\Competitive\all companies.xls"

What I would like to do to the file that I kill at the end (G:\Finance\2004\...) is open it at the beginning of the macro. What is the best way of going about this? I know it will only be like one line of code it's just too early in the morning for me right now I guess.

Thanks in advance,
Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top