Dim temp, ddd改为
Dim temp
Dim ddd

解决方案 »

  1.   

    是text1.keydown ? 怎么又form_click,还form1
    清楚些好吗
      

  2.   

    ddd = DateDiff(s, dstart, temp)
    s
    ???
      

  3.   

    不还意思,错了,
    ddd = DateDiff(s, dstart, temp)
        中s 没有定义
      

  4.   

    不如把  Option Explicit 删除
      

  5.   

    ddd = DateDiff(s, dstart, temp)
    中应写成
    ddd=datediff("s",dstart,temp),按秒比较
      

  6.   

       to  : wufang(牛牛)     我不同意
      有option explicit可以防止一些变量上的错误
      例如:   addata="111"..........
      if adata="111" then    msgbox "ok"
      end if这样,就会产生两个变量,特别是有很多的时候
      

  7.   

    Dim temp, ddd改为
    Dim temp
    Dim ddd
    MsgBox (ddd) 改为call MsgBox (ddd)
      

  8.   

    sorry!! 依据你的想法,刻程序不能实现!
    不信,再试试n天n月之后你就知道了。
      

  9.   

    Option Explicit
    Dim dstart
    Dim temp, dddPrivate Sub Form_Load()
        dstart = Time
    End SubPrivate Sub Form_Click()
        temp = Time
        ddd = DateDiff("d", Now, temp)    MsgBox (ddd)
    End Sub
      

  10.   

    : wlk(温水) (2001-12-21 21:18:16) 说的对