月末日をいちいち打つのがめんどかったので初心者が作った(もともとExcelにそういう機能があるのかは知らない。あったらこれはゴミ)、改造でもなんでもどぞ…
うるう年は正確じゃないです
月末日をいちいち打つのがめんどかったので初心者が作った(もともとExcelにそういう機能があるのかは知らない。あったらこれはゴミ)、改造でもなんでもどぞ…
うるう年は正確じゃないです
title "月末日を表示 0.1"
screen 0,480,640
inx=100 : iny=20
mes "↓最初の年の入力(西暦),半角数字"
nen=2020
input nen,inx,iny,4
mes "↓最初の月の入力,半角数字"
tuki=5
input tuki,inx,iny,2
mes "↓何月分出す?,半角数字,1~999,0で無限"
kai=10
input kai,inx,iny,3
button "GO!!" ,*main
day=0
count=0
stop
*main
newcom xlApp, "Excel.Application"
xlApp("Visible") = 1
xlBooks = xlApp("Workbooks")
xlBook = xlBooks("Add")
xlSheet = xlBook("Worksheets", "sheet1")
*start
count=count+1
if(tuki=1){day=31}
if(tuki=2){if(nen\4=0){day=29}else{day=28}}
if(tuki=3){day=31}
if(tuki=4){day=30}
if(tuki=5){day=31}
if(tuki=6){day=30}
if(tuki=7){day=31}
if(tuki=8){day=31}
if(tuki=9){day=30}
if(tuki=10){day=31}
if(tuki=11){day=30}
if(tuki=12){day=31}
//セルの指定(A列は固定)……countで代用可能?
// セルの編集
xlRange = xlSheet("Range", "A"+count+"")
xlRange("Value") = ""+nen+"."+tuki+"."+day+"" //出力ゥ
if(count=kai){goto *endbutton}
tuki=tuki+1
if(tuki=13){tuki=1 : nen=nen+1}
//wait 1
goto *start //戻る!
*endbutton
delcom xlRange
delcom xlBook
delcom xlBooks
delcom xlApp
button "終了" ,*owari
stop
*owari
end