Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM ***** BASIC *****
- Sub MAIN
- Dim oCell1 As Object, oCell2 As Object, oCell3 As Object
- Dim oSheet As Object
- Dim x As Integer, i As Integer
- x = 2
- oSheet = ThisComponent.Sheets(0)
- For i = 0 to 400
- oCell1 = oSheet.getCellByPosition(0, i)
- oCell2 = oSheet.getCellByPosition(1, i)
- oCell3 = oSheet.getCellByPosition(2 + x, i)
- oCell1.Value = i + 2000
- oCell2.Value = x
- oCell3.Value = x
- oSheet.getCellByPosition(2 + x, 401).Value = oSheet.getCellByPosition(2 + x, 401).Value + 1
- If ((i + 1) mod 4 = 0) AND (((i + 1) mod 100 <> 0) OR ((i +1) mod 400 = 0)) Then
- x = (x + 2) mod 7
- Else
- x = (x + 1) mod 7
- End If
- NEXT i
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement