Option Explicitdim DBADO AS New Adodb.ConnectionDim Cmdado As New Adodb.commanddim Sqlstr AS Stringdim Howdo As Stringdim FileName As String
Private submmand1_click () filename = app.path & "Enter new file name:", "save") & ".xls" howDO = text1.text
DBADO.OPEN ("provider = microsoft.jet.Oledb.4.0; data source =" & app.path & "/goods.mdb; prorsist security info = false")
SQLSTR = "SELECT * INTO [Excel 5.0; Database =" & FileName & "]. [data] from [Basic] Where ID in (" & Howdo & ")
DBADO.EXECUTE (SQLSTR), AdcmdText Adexecutenorecords
DBADO.CLOSE
End Sub