- Katılım
- 14 Ocak 2005
- Mesajlar
- 792
- Excel Vers. ve Dili
- Ofis 2010 2016
- Altın Üyelik Bitiş Tarihi
- 13/03/2022
RST.FIELDS kontrol koyup şartım tutarsa sayfaya yazdırmak istiyorum aşağıda belirttiğim gibi.
rst.fields(5)+rest.fields.(7) toplamı 0 dan büyükse bu döngünün excel hücrelerini bilgileri yazdırmasını istiyorum
Rica etsem nasıl kurgularım.
Kod:
Set RST.DataSource = SQLCON.Execute(SQLText)
Do Until RST.EOF
For i = 1 To RST.RecordCount Step 1
Cells(i + 4, 1) = RST.Fields(0)
Cells(i + 4, 2) = RST.Fields(1)
Cells(i + 4, 3) = RST.Fields(2)
Cells(i + 4, 4) = RST.Fields(3)
Cells(i + 4, 5) = RST.Fields(4)
Cells(i + 4, 6) = RST.Fields(5)
Cells(i + 4, 7) = RST.Fields(6)
Cells(i + 4, 8) = RST.Fields(7)
RST.MoveNext
Next i
Loop
RST.Close
SQLCON.Close
Rica etsem nasıl kurgularım.