forumdaki aramalarım sonucunda Excel şablonuna verileri atmaya çalışıyorum. Forumdaki konularda çalışan kodları kendime uyarlamaya çalıştım ama yinede hata aldım. Bi türlü çözemedim işi. Birkaç farklı yol denedim ama olmadı . Yol gösterirseniz sevinirim.
Visual Basic
- Private Sub Komut297_Click()
- 'excel deneme 3
- Dim xl As Excel.Application
- Dim xlwkbk As Excel.Workbook
-
- If Me.Dirty Then
- DoCmd.RunCommand acCmdSaveRecord
- End If
-
- Set xl = New Excel.Application
- Set xlwkbk = xl.Workbooks.Open(CurrentProject.Path & "\indkdvlist.xls")
- xl.Visible = True
- With xl.Sheets("İndirilecek KDV Listesi").Select
- xl.Range("B4") = DLookup("[Kimlik]", "listeAfrm", "[Kimlik]=" & Me.Id)
- End With
-
- xl.Visible = True
-
-
- Set xl = Nothing
- Set xlwkbk = Nothing
-
- End Sub