我的代码如下:
Dim currdate as date
currdate=date
debug.print currdate
代码出错,请问如何处理

解决方案 »

  1.   

    应该没有问题,你可以尝试用一个文本框来直接显示日期,或者用MsgBox来显示啊!
    我的代码更加简单:
    private sub command1_click()
    text1.text = date
    end sub
    直接就可以看到当前日期啦!
      

  2.   

    出错?怎么会?出什么错?
    比较常见的可能是:
    Dim currdate as date
    currdate=VBA.DateTime.Date
    debug.print currdate
      

  3.   

    没有错啊,你是不是没有打监视窗口,所以没有看到PRINT的时间啊
      

  4.   

    no problem!楼主你用的是vb6.0吗?
    反正在vb6上没有问题
      

  5.   

    Dim currdate as date
    currdate=date
    msgbox currdate就有了