View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default 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?