08/07/06 22:02:51
>>296
年・月・日から、曜日を求める方法はいくつかありますが、
大筋は>>298です。まずは次の関数について調べてみてください。
・DateSerial関数 ・Format関数
これらの機能が理解できたら、次のコードが何をしているかわかるはずです。
(うるう年でも問題ありません)
Sub youbi()
Dim year As Integer
Dim month As Integer
Dim day As Integer
Dim theDate As Date
Dim youbi As String
year = 2008
month = 7
day = 1
myDate = DateSerial(year, month, day)
youbi = Format(myDate, "aaa")
MsgBox youbi
End Sub
(続く)