Pages

Wednesday, February 4, 2015

Excel

On Error Resume Next
MsExcel.Workbooks.Add
MsExcel.Range("A1").Value = "Kode Studio"
MsExcel.Range("B1").Value = "Nama Band"
MsExcel.Range("C1").Value = "Durasi/Jam"
MsExcel.Range("D1").Value = "Total Bayar"

i = 1
Do While Not Adodc1.Recordset.EOF
MsExcel.Range("A" & i + 1).Value = Adodc1.Recordset("Kode_Studio")
MsExcel.Range("B" & i + 1).Value = Adodc1.Recordset("Nama_Band")
MsExcel.Range("C" & i + 1).Value = Adodc1.Recordset("Durasi")
MsExcel.Range("D" & i + 1).Value = Adodc1.Recordset("Total_Bayar")

i = i + 1
Adodc1.Recordset.MoveNext
Loop
MsExcel.Visible = True
Adodc1.Recordset.MoveFirst

No comments:

Post a Comment