我要在msgbox裡寫時間..怎麼寫??
時間為以現在算起的下個月
ex 3月→4月 4月→5月
2006-03-19 05:14:58 · 2 個解答 · 發問者 lunabelial 2 in 教育與參考 ➔ 考試
如果要用select case 呢?
&
指定某一天?
if then & select case 皆可
我想多多了解! 謝謝
2006-03-19 10:57:22 · update #1
'依你要求的方式Select Case Month(Date) Case 1: S = 2 Case 2: S = 3 Case 3: S = 4 Case 4: S = 5 Case 5: S = 6 Case 6: S = 7 Case 7: S = 8 Case 8: S = 9 Case 9: S = 10 Case 10: S = 11 Case 11: S = 12 Case 12: S = 1End SelectMsgBox "現在為" & Month(Date) & "月,下一個月份為" & S & "月"'另一種方式S = Month(DateAdd("M", 1, Date))MsgBox "現在為" & Month(Date) & "月,下一個月份為" & S & "月"
2006-03-18 19:15:07 · answer #1 · answered by W.J.S. 7 · 0⤊ 0⤋
If Mid(Date, 6, 1) = 1 Or 3 Or 5 Or 7 Or 8 Or 10 Or 12 Then
x = 31
Else
x = 30
End If
MsgBox "下個月的今天為:" & Date + x & "", , "..."
方法很蠢= =+XD
2006-03-19 22:07:10 補充:
原來有Month()可以用= =
課本沒有寫啦
呵呵
2006-03-18 15:05:20 · answer #2 · answered by sbb 2 · 0⤊ 0⤋