ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   export into Q BOOKS 07 (https://www.excelbanter.com/excel-programming/413892-export-into-q-books-07-a.html)

Gary

export into Q BOOKS 07
 
OK here you go. I would like to export sales records from Q B 2007 into
excel. Now the kicker is we have a sales meeting once a week. I made a
worksheet with all the sales mens sales for the week, month year to date.
The owner only wants to see certain info and keep it simple. Is there a way
to export from Q Books certain values into my workbook? I can email you my
excel sht if you want?

Mike

export into Q BOOKS 07
 
I dont know if you can export what you want from QB. But i know you can pull
the data from excel.
Private Sub QBData()
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strSQL As String, strConn
Dim i As Integer

'Use to connect to Quickbooks
strConn = "Provider=MSDASQL.1;Persist Security Info=False; " _
& "Data Source=QuickBooks Data;OLE DB Services=-2;"

strSQL = "Select Name FROM Sales Where Name = 'Mike'"

Set cnn = New ADODB.Connection
Set rs = New ADODB.Recordset
cnn.Open strConn
rs.Open strSQL, cnn, adOpenForwardOnly, adLockReadOnly

i = 2
Do While rs.EOF = False
Worksheets(addressSheet).Range("A" & i) = _
rs.Fields("Name").Value
i = i + 1
rs1.MoveNext
Loop
rs.Close
cnn.Close
End Sub

"Gary" wrote:

OK here you go. I would like to export sales records from Q B 2007 into
excel. Now the kicker is we have a sales meeting once a week. I made a
worksheet with all the sales mens sales for the week, month year to date.
The owner only wants to see certain info and keep it simple. Is there a way
to export from Q Books certain values into my workbook? I can email you my
excel sht if you want?



All times are GMT +1. The time now is 02:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com