This may have been better posted in the Excel Discussion Board on the forum.
I don't believe its that difficult,
You can probably start with :
Private Sub Command1_Click()
Dim strname As String
strname = App.Path & "\chien.xls"
Open strname For Append Access Read Write As #1
Print #1, Text1.Text & vbTab & Text2.Text & vbCrLf & Text3.Text
Dim MSdata As Database
Dim Rst As Recordset
'1 create a link to the database
Set MSdata = OpenDatabase("fath_and_databasename.mdb", , False)
' and error i have found he is the it does not like long file name have to use the ~
'2 open the table
Set Rst = MSdata.OpenRecordset("table_or_sql")
'3 you are in
Set MSdata = Nothing
don't forget to
tool -> References
and pick microsoft DAO 3.51 object library
Last edited by myle; 05-30-07 at 15:35.
hope this help
See clear as mud
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment: Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010 VB based on my own environment: vb6 sp5 ASP based on my own environment: 5.6 VB-NET based on my own environment started 2007 SQL-2005 based on my own environment started 2008 MYLE YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
The user would like to click a button and the excel spreadsheet inserts into an access 2000 table. The ODBC connection works when I get access data into excel. When I use the followng Dim MSdata As Database, Dim Rst As Recordset I get compile errors. DAO and ADO connection don't seem to work. I can write VB code, not good with MS Access connection stuff in Excel Visual Basic. Thanks for any help.