Private Sub CommandButton1_Click
Dim Doc As Object
Dim Sheet As Object
Dim Cell As Object
Dim ts, kaplan, Satir
ts=1
Doc = ThisComponent
Sheet = Doc.Sheets(0)
Cell = Sheet.getCellRangeByName("B1")
If Cell.Type = com.sun.star.table.CellContentType.EMPTY Then
MsgBox "Sıra No Girmediniz"
Exit Sub
End If
Cell = Sheet.getCellRangeByName("B2")
If Cell.Type = com.sun.star.table.CellContentType.EMPTY Then
MsgBox "Kuyu No Girmediniz"
Exit Sub
End If
Cell = Sheet.getCellRangeByName("B3")
If Cell.Type = com.sun.star.table.CellContentType.EMPTY Then
MsgBox "Seri No Girmediniz"
Exit Sub
End If
Cell = Sheet.getCellRangeByName("B4")
If Cell.Type = com.sun.star.table.CellContentType.EMPTY Then
MsgBox "Başlangıç Tarihi Girmediniz"
Exit Sub
End If
Cell = Sheet.getCellRangeByName("B5")
If Cell.Type = com.sun.star.table.CellContentType.EMPTY Then
MsgBox "Başlangıç Endeksi Girmediniz"
Exit Sub
End If
Cell = Sheet.getCellRangeByName("B6")
If Cell.Type = com.sun.star.table.CellContentType.EMPTY Then
MsgBox "Bitiş Tarihi Girmediniz"
Exit Sub
End If
Cell = Sheet.getCellRangeByName("B7")
If Cell.Type = com.sun.star.table.CellContentType.EMPTY Then
MsgBox "Bitiş Endeksi Girmediniz"
Exit Sub
End If
For Satir=1 To 65536
If Doc.Sheets(1).getCellRangeByName("A"&Satir).Type = com.sun.star.table.CellContentType.EMPTY Then
ts=Satir
Exit For
Else
ts=65537
End If
Next Satir
Doc.Sheets(1).getCellRangeByName("A" & ts).Value = Sheet.getCellRangeByName("B1").Value
Doc.Sheets(1).getCellRangeByName("B" & ts).Value = Sheet.getCellRangeByName("B2").Value
Doc.Sheets(1).getCellRangeByName("C" & ts).Value = Sheet.getCellRangeByName("B3").Value
Doc.Sheets(1).getCellRangeByName("D" & ts).Value = Sheet.getCellRangeByName("B4").Value
Doc.Sheets(1).getCellRangeByName("E" & ts).Value = Sheet.getCellRangeByName("B5").Value
Doc.Sheets(1).getCellRangeByName("F" & ts).Value = Sheet.getCellRangeByName("B6").Value
Doc.Sheets(1).getCellRangeByName("G" & ts).Value = Sheet.getCellRangeByName("B7").Value
ts=Sheet.getCellRangeByName("B1").Value+1
Sheet.getCellRangeByName("B1").Value = ts
Sheet.getCellRangeByName("B2").String = ""
Sheet.getCellRangeByName("B3").String = ""
Sheet.getCellRangeByName("B4").String = ""
Sheet.getCellRangeByName("B5").String = ""
Sheet.getCellRangeByName("B6").String = ""
Sheet.getCellRangeByName("B7").String = ""
End Sub
Kayıtlı kullanıcılar: Google [Bot]