u excelu imam podatke u kolonama B do E i sa sledećim kodom sam pokušao da exportujem podatke iz excela u access ali prijavljuje grešku kod
db As Database
Sub p()
Dim db As Database, rs As Recordset, r As Long
Set db = OpenDatabase("C:\FPC\od3.mdb")
' open the database
Set rs = db.OpenRecordset("od31", dbOpenTable)
' get all records in a table
r = 3 ' the start row in the worksheet
Do While Range("B" & r).Value > 0
' repeat until first empty cell in column A
With rs
.AddNew ' create a new record
' add values to each field in the record
.Fields("ID") = Range("B" & r).Value
.Fields("prezime") = Range("C" & r).Value
.Fields("ime") = Range("D" & r).Value
.Fields("ocena") = Range("E" & r).Value
' add more fields if necessary...
.Update ' stores the new record
End With
r = r + 1 ' next row
Loop
rs.Close
Set rs = Nothing
db.Close
Set db = Nothing
End Sub
zafa