;
帖子
3919 
精华
积分
11710 
鱼币
0 ¥ 
来自
大连 
在线时间
1858 小时 
注册时间
2007-6-11 
最后登录
2009-10-20 

贴图大师勋章新人进步勋章宣传大使勋章论坛元老勋章

3
发表于 2009-1-5 19:48 | 只看该作者
鏌ユ壘鏈堜唤鐨勬渶鍚庝竴澶 - 缂栫▼搴 - Powered by SupeSite

浣犵殑浣嶇疆锛缂栫▼搴 >> 璧勮 >> VB >> VBAPI >> 璇︾粏鍐呭 鍦ㄧ嚎鎶曠ǹ

鏌ユ壘鏈堜唤鐨勬渶鍚庝竴澶

鍙戝竷: 2008-7-15 14:21 |  浣滆: 缃戠粶杞浇 |   鏉ユ簮: 缃戠粶杞浇 |  鏌ョ湅: 4娆

鏌ユ壘鏈堜唤鐨勬渶鍚庝竴澶

In many industries (particularly in the insurance industry), it娉ㄩ噴锛歴 important to know the last day of the month. To find the last day of a given month, add a text box and a command button to a form. Enter the following code in the command button:

Dim TEMP2 As Date

Dim nLastDay As Integer

TEMP2 = InputBox$("Please Enter A Date", "LastDay")

nLastDay = DatePart("d", DateAdd("M", 1, TEMP2 - DatePart("d", TEMP2)))

Text1.Text = nLastDay

When you run the application and click the button, you娉ㄩ噴锛歭l be prompted for a date. Then, the program will display the last day of that month of any year.

鎵撳嵃 | 鏀惰棌姝ら〉 |  鎺ㄨ崘缁欏ソ鍙 | 涓炬姤
涓婁竴绡 涓嬩竴绡
 

璇勫垎锛0

鍙戣〃璇勮
鏌ョ湅鍏ㄩ儴鍥炲銆愬凡鏈0浣嶇綉鍙嬪彂琛ㄤ簡鐪嬫硶銆