Private Sub Command12_Click()
Dim I As Integer
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "KAYIT YOK"
Exit Sub
End If
Dim ExcelNesne As Object
Set ExcelNesne = CreateObject("Excel.SHEET")
ExcelNesne.Application.Visible = True
ExcelNesne.Application.Cells(1, 1).Font.Size = 11
ExcelNesne.Application.Cells(1, 1).Font.Bold = True
ExcelNesne.Application.Cells(1, 1).Font.Underline = True
ExcelNesne.Application.Cells(1, 1).Font.Color = vbBlue
ExcelNesne.Application.Cells(1, 1).ColumnWidth = 40
ExcelNesne.Application.Cells(1, 1).Value = "EXCEL DENEME PROGRAMI"
ExcelNesne.Application.Cells(1, 1).Font.Size = 11
ExcelNesne.Application.Cells(1, 1).Font.Bold = True
ExcelNesne.Application.Cells(1, 1).Font.Underline = True
ExcelNesne.Application.Cells(2, 1).Font.Color = vbRed
ExcelNesne.Application.Cells(2, 1).ColumnWidth = 15
ExcelNesne.Application.Cells(2, 1).Value = "PLAKA"
ExcelNesne.Application.Cells(2, 2).Font.Color = vbRed
ExcelNesne.Application.Cells(2, 2).ColumnWidth = 15
ExcelNesne.Application.Cells(2, 2).Value = "MARKA"
ExcelNesne.Application.Cells(2, 3).Font.Color = vbRed
ExcelNesne.Application.Cells(2, 3).ColumnWidth = 15
ExcelNesne.Application.Cells(2, 3).Value = "RENK"
ExcelNesne.Application.Cells(2, 4).Font.Color = vbRed
ExcelNesne.Application.Cells(2, 4).ColumnWidth = 15
ExcelNesne.Application.Cells(2, 4).Value = "KimNo"
I = 2
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF = True
I = I + 1
ExcelNesne.Application.Cells(I, 1).Value = Adodc1.Recordset.Fields("PLAKA")
ExcelNesne.Application.Cells(I, 2).Value = Adodc1.Recordset.Fields("MARKA")
ExcelNesne.Application.Cells(I, 3).Value = Adodc1.Recordset.Fields("RENK")
ExcelNesne.Application.Cells(I, 4).Value = Adodc1.Recordset.Fields("KimNo")
Adodc1.Recordset.MoveNext
Loop
MsgBox "PROGRAMA DÖN"
End Sub
en mukemmel ornegı bunu sız kendınız gore duzenleyın not("alıntıdır")
Cevapla
Son Düzenleme: 19/01/2010, 03:19, Düzenleyen: crykoray.