- Katılım
- 28 Ağustos 2004
- Mesajlar
- 48
- Excel Vers. ve Dili
- Microsoft Excel 2007 - Türkçe
- Altın Üyelik Bitiş Tarihi
- 02.08.2019
AÃAÃIDAKÃ KODTA NE YAPMAM LAZIM?
Private Sub CommandButton1_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim satir As Long
Dim yol As String
yol = ActiveWorkbook.Path
Set db = OpenDatabase(yol & "\KASA.xls", False, False, "Excel 8.0")
Set rs = db.OpenRecordset("SELECT KASA, SUM(GBORÇ), SUM(GALACAK) FROM `DATA` GROUP BY KASA")
With rs
.MoveLast
satir = .RecordCount
.MoveFirst
End With
'Gelen Verileri A1 hücresine yazdırmak istiyorum
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
End Sub[/i]
Private Sub CommandButton1_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim satir As Long
Dim yol As String
yol = ActiveWorkbook.Path
Set db = OpenDatabase(yol & "\KASA.xls", False, False, "Excel 8.0")
Set rs = db.OpenRecordset("SELECT KASA, SUM(GBORÇ), SUM(GALACAK) FROM `DATA` GROUP BY KASA")
With rs
.MoveLast
satir = .RecordCount
.MoveFirst
End With
'Gelen Verileri A1 hücresine yazdırmak istiyorum
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
End Sub[/i]