Time example

  • Thread starter Thread starter Don Meeker
  • Start date Start date
D

Don Meeker

In the VBA help file an example is given to display the system time:

Dim MyTime
MyTime =Time 'Return current System time.

I added this for display:
MsgBox (MyTime)

What I get is a compile error: Expected Function or variable

If there are no arguments for the time function why would I get this
message?
Don
 
Hi Don
the following works for me:
Sub foo()
Dim MyTime
MyTime = Time 'Return current System time.
MsgBox MyTime
End Sub
 
Back
Top