Time example

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
 
F

Frank Kabel

Hi Don
the following works for me:
Sub foo()
Dim MyTime
MyTime = Time 'Return current System time.
MsgBox MyTime
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top