本帖最后由 hyangelfish 于 2011-02-09 20:41:45 编辑

解决方案 »

  1.   

    Private Sub Text1_Change()
    Label2.Caption = Format(DateAdd("h", Val(Text1.Text), Now), "MM月DD日 hh:mm")
    End Sub
    dateadd函数。这个只是个简单示例……
      

  2.   

    Private Sub Form_Load()
    Label1.Caption = Format(Now, "YYYY年MM月DD日 hh:mm:ss")End Sub
    Private Sub Text1_Change()
    Label1.Caption = Format(Now, "YYYY年MM月DD日 hh:mm:ss")
    Label2.Caption = Format(DateAdd("h", Val(Text1.Text), Now), "YYYY年MM月DD日 hh:mm:ss")
    End Sub
    这个基本符合你题意了
      

  3.   

    还是不行Label2显示的还是当前的时间与Label1相同
      

  4.   

    Private Sub Form_Load()
    Label1.Caption = Format(Now, "YYYY年MM月DD日 hh:mm:ss")
    Text1.Text=""
    End Sub
    Private Sub Text1_Change()
    Label1.Caption = Format(Now, "YYYY年MM月DD日 hh:mm:ss")
    Label2.Caption = Format(DateAdd("h", Val(Text1.Text), Now), "YYYY年MM月DD日 hh:mm:ss")
    End Sub
      

  5.   

    Dim YMD As Date
    Private Sub Form_Load()
    YMD = Now
    Label1.Caption = Format(YMD, "YYYY年MM月DD日 hh:mm:ss")End Sub
    Private Sub Text1_Change()
    Label2.Caption = Format(DateAdd("h", Val(Text1.Text), YMD), "YYYY年MM月DD日 hh:mm:ss")
    End Sub这次真知道你题意了