Skip to main content

AccessTr.neT


Visual Basic6 ile datagrid

Visual Basic6 ile datagrid

Çözüldü #2
Sn:x0914667
Aşağıdaki kodları deneyiniz.

Private Sub CmdExcel_Click()
Dim I As Integer
Dim ExcelNesne As Object
Set ExcelNesne = CreateObject("Excel.SHEET")
ExcelNesne.Application.Visible = True
'_________________________________________________________
ExcelNesne.Application.Cells(1, 1).Font.Size = 20
ExcelNesne.Application.Cells(1, 1).Font.Bold = True
ExcelNesne.Application.Cells(1, 1).Font.Color = vbBlue
ExcelNesne.Application.Cells(1, 1).Value = "ÖDEME RAPORU"
'__________________________________________________________
ExcelNesne.Application.Cells(2, 1).Font.Color = vbRed
ExcelNesne.Application.Cells(2, 1).ColumnWidth = 20
ExcelNesne.Application.Cells(2, 1).Value = "Adı Soyadı"
'__________________________________________________________
ExcelNesne.Application.Cells(2, 2).Font.Color = vbRed
ExcelNesne.Application.Cells(2, 2).ColumnWidth = 12.5
ExcelNesne.Application.Cells(2, 2).Value = "Tc Kimlik No"

I = 2
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF = True
I = I + 1

ExcelNesne.Application.Cells(I, 1).Value = Adodc1.Recordset.Fields("Adi_Soyadi")
ExcelNesne.Application.Cells(I, 2).Value = Adodc1.Recordset.Fields("Tc_Kimlik_No")

Adodc1.Recordset.MoveNext
Loop
End Sub
OĞULCAN & OLCAYTUĞ

Oğulcan Excel Web Sitesi
Excel İle Programlama
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Visual Basic6 ile datagrid - Yazar: x0914667 - 13/09/2010, 11:35
Cvp: Visual Basic6 ile datagrid - Yazar: ogulcan92 - 13/09/2010, 11:53
Cvp: Visual Basic6 ile datagrid - Yazar: x0914667 - 14/09/2010, 21:53
Cvp: Visual Basic6 ile datagrid - Yazar: Olcay - 14/09/2010, 23:19
Cvp: Visual Basic6 ile datagrid - Yazar: chopper07 - 15/09/2010, 10:03
Cvp: Visual Basic6 ile datagrid - Yazar: ogulcan92 - 19/09/2010, 13:51
Task