jel moguce i naravno kako :) da celiju iz access tabele upisujem u odredjenu excel celiju?
tj, potrebno mi je da u formiranu i graficki doteranu excel tabelu upisujem podatke koji se unose u Access bazu.
Evo ti moja funkcija koja je prepisivala iz acces tabele u neku excel tabelu ...
malo prouči kod, prvo moraš otvoriti excel fajl i onda u njega upisuješ , i ne zaboravi da moraš i na kraju zatvoriti excel fajl
Da i u referencama moraš uključiti Microsoft Excel object library
If Len(dput) < 3 Then
MsgBox "NE POSTOJI EXCEL TABLICA " + PPopen + " MORATE JE KREIRATI"
Exit Sub
End If
Set objexcel = CreateObject("Excel.Application")
objexcel.Workbooks.Open (PPopen)
objexcel.Application.Visible = True
Dim dato11 As Database
Dim rek11 As Recordset
Set dato11 = CurrentDb
Dim sqlupit11 As String
sqlupit11 = "select * from finstatement"
Set rek11 = dato11.OpenRecordset(sqlupit11)
Dim dato2 As Database
Dim rek2 As Recordset
Set dato2 = CurrentDb
Dim sqlupit2 As String
sqlupit2 = "select * from finitem where statementid=" & statid
Set rek2 = dato2.OpenRecordset(sqlupit2)
red = 10
Do While Not rek2.EOF
objexcel.Cells(red, kolona).Value = "'" & rek2.Fields("accountid").Value
objexcel.Cells(red, kolona + 1).Value = rek2.Fields("Accountvalue").Value
red = red + 1
rek2.MoveNext
Loop
rek2.Close
Set dato2 = Nothing