Copy Data from Access.mdb into an Excel Spreadshee
Dear Users,
I have attached a piece of code which copies an Access Table onto an Excel Spreadsheet. Does anyone know how to ?
1) Get the information to code to skip the first couple of rows then input the information from the Database.
2) How does one copy the information onto a specific spreadsheet; this code opens a new worksheet. But I would like to update an existing worksheet?
**********************************
Dim cnSrc As New ADODB.Connection()
Dim TDate As New System.DateTime(2004, 11, 30)
Dim WKTemp As String
TDate = Today()
WKTemp = "Ross" & " " & TDate
Dim num_Copied As Long
cnSrc.Open("Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\DATA\ACCESS\13FloorEquipment.mdb;")
cnSrc.Execute("SELECT * INTO [Excel 8.0;DATABASE=C:\DATA\ACCESS\13FloorEquipment.xls].[" & WKTemp & "] FROM [Requests]")
cnSrc.Close()
*******************************
|