VB 计算函数

[复制链接]
查看11 | 回复2 | 2011-1-31 02:25:07 | 显示全部楼层 |阅读模式
public function date2time(startdate as string,enddate as string)as longdim syear ,smonth,sday,shour,sminute,ssecond,syear ,emonth,eday,ehour,eminute,esecond as Integerdim i,j,k as Integeri = 1j = 0k = 0syear=left(startdate,4)eyear=left(enddate,4)doif mid(startdate,i,1)="-" thenif j=0 thenj=ielsesmonth =...
回复

使用道具 举报

千问 | 2011-1-31 02:25:07 | 显示全部楼层
Private Sub Command1_Click()Set sc = CreateObject("ScriptControl")sc.Language = "VBScript"Label1.Caption = sc.Eval(Text1.Text)End Sub...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行