jolivanes
01-08-2010, 01:01 AM
With the following code I get information from a .mdb file
Workbooks.OpenDatabase Filename:="C:\C\SomeFile.MDB", CommandText:=Array( _
"SomeParams"), CommandType:=xlCmdTable
The workbook opened by above code needs to be deleted after the following:
Range("A1", Range("A" & Rows.Count).End(xlUp).Offset(, 16)).Copy
Windows("AnotherWorkbook.xls").Activate
Range("A1").Select
ActiveSheet.Paste
The workbook name could be anything from Book1, Book2, Book3 etc etc.
How would I go about this?
Thank you very much in advance
Regards
John
Workbooks.OpenDatabase Filename:="C:\C\SomeFile.MDB", CommandText:=Array( _
"SomeParams"), CommandType:=xlCmdTable
The workbook opened by above code needs to be deleted after the following:
Range("A1", Range("A" & Rows.Count).End(xlUp).Offset(, 16)).Copy
Windows("AnotherWorkbook.xls").Activate
Range("A1").Select
ActiveSheet.Paste
The workbook name could be anything from Book1, Book2, Book3 etc etc.
How would I go about this?
Thank you very much in advance
Regards
John