Export the query results to another method of Excel
Time: 2004-8-10 Author: Unknown [obtain this document the absence of records, deeply sorry, this document is reproduced in full]
Option ExplicitDim dbado As New ADODB.ConnectionDim cmdado As New ADODB.CommandDim sqlstr As StringDim howdo As StringDim filename As String Private Sub command1_click () filename = App.Path & "/" & InputBox ( "Enter the new file name:", "Save ") &" .xls "howDO = text1.text dbado.open (" provider = microsoft.jet.oledb.4.0; data source = "& app.path&" /goods.mdb; proSist security info = false "SQLSTR = "SELECT * INTO [Excel 5.0; Database =" & filename "]. [Data] from [Basic] where id in (" & hopedo & ")" DBADO.EXECUTE (SQLSTR), AdcmdText Adexecutenorecords DBADO.CLOSE End Sub China .Net Club reproduced this article. Let us make progress together and share human technical resources. [www.chinaaspx.com]