ページ 11

Calc Basic Do loop while, select case

Posted: 1月 3, 2020, 11:47 am
by jpb
OpenOffice 初心者です。 Excel VBA でそのまま作動しないものを Calc Basic で書き直していますが、Do Loop While がよく分かりません。 下記が記述とその結果です。 Select Case が土曜で止まり、次は 8, 9, 10 の dateserial の日付が表示されます。 どこが間違っているのでしょうか。 ご指導頂けるとありがたいのですが。 又、Excel VBA では 入れ子の For でうまく作動しましたが、OpenOffice では作動しません。 

REM ***** BASIC *****
Sub Dating
Dim document as object
dim sheet as object
document = ThisComponent
sheet = document.sheets(7)

Dim i as integer
Dim j as date
Dim k as variant

i = 5
j = sheet.getCellByPosition(0, i).value
k = WeekDay(j)

Do
sheet.getCellByPosition(0, i).value = j
sheet.getCellByPosition(1, i).value = k
Select Case k
Case = 1
sheet.getCellByPosition(1, i).string = "(日)"
Case = 2
sheet.getCellByPosition(1, i).string = "(月)"
Case = 3
sheet.getCellByPosition(1, i).string = "(火)"
Case = 4
sheet.getCellByPosition(1, i).string = "(水)"
Case = 5
sheet.getCellByPosition(1, i).string = "(木)"
Case = 6
sheet.getCellByPosition(1, i).string = "(金)"
Case = 7
sheet.getCellByPosition(1, i).string = "(土)"

End Select
i = i + 6
j = j + 1
k = k + 1

Loop While i <= 334

End Sub

01/01/20 (水)





01/02/20 (木)





01/03/20 (金)





01/04/20 (土)





01/05/20 01/07/00





01/06/20 01/08/00

Re: Calc Basic Do loop while, select case

Posted: 9月 30, 2024, 5:42 pm
by hebemiley
The competitive scene in Krunker is thriving! I’ve watched some intense matches on Twitch, and the skill level is impressive. From quick reflexes to strategic plays, the players showcase their talents. It’s inspiring to see how dedicated the community is to improving their skills.

Re: Calc Basic Do loop while, select case

Posted: 10月 1, 2024, 2:54 pm
by maruusa0106
One tip when playing Slitherio is that when your snake is big enough, you can try to surround and kill other snakes to get their food.

Re: Calc Basic Do loop while, select case

Posted: 12月 4, 2024, 7:42 pm
by otisjame
In Sprunki the characters you interact with have been completely redesigned to match the mod's funky theme. Each character sports vibrant, colorful outfits and fun, animated moves that reflect the upbeat nature of the mod.

Re: Calc Basic Do loop while, select case

Posted: 4月 17, 2025, 12:58 pm
by incrediboxsprunki
Mastering loops and logic with Calc Basic Do While and Select Case? Just like coding, urban planning needs smart structures! Check out creative city-building at Incredibox Sprunki Phase 4 Fanmake—where tech meets urban innovation!

Re: Calc Basic Do loop while, select case

Posted: 4月 17, 2025, 1:00 pm
by incrediboxsprunki
Mastering control flow with Do While loops and Select Case in Calc Basic? Just like efficient code, great urban planning requires smart logic and iteration! Explore innovative city-building strategies at Sprunki Phases - where programming concepts meet urban development.

Re: Calc Basic Do loop while, select case

Posted: 5月 9, 2025, 12:06 pm
by nytwordlehints
It took me a little while to read all of the comments, but I found the article to be quite intriguing. word vs word