export into Q BOOKS 07

G

Gary

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 men’s 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?
 
M

Mike

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
 

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

Top