更新时间:2023-12-03 08:14:22
将此代码用于文本框的按键事件
如果asc(e.keycode)= 13,则
将dt dt作为新日期
dt ="26-12-2011"
将a变暗为integer = dt.dayofWeek()
如果a = 1则
msgbox(星期一")
elseif a = 2则
msgbox(星期二")
elseif a = 3然后
msgbox(星期三")
等等
如果
use this code into keypress event of text box
if asc(e.keycode)=13 then
dim dt as new date
dt="26-12-2011"
dim a as integer=dt.dayofWeek()
if a=1 then
msgbox("Monday")
elseif a=2 then
msgbox("Tuesday")
elseif a=3 then
msgbox("Wednesday")
so on
end if