Time Function Problem
- From: "AK" <nospam@xxxxxxxxxxx>
- Date: Wed, 24 May 2006 01:48:26 GMT
I can get the Date function to work but the time Function returns the
following error at the line MyTime = Time
Run time error 450 Wrong number of arguments or invalid property assignment
Here is my code:
Private Sub cmdClickHere_Click()
Dim MyDate As Date
MyDate = Date
lblTime.Caption = MyDate
End Sub
'The above works and returns the correct value
Private Sub cmdClickHere2_Click()
Dim MyTime As Variant
MyTime = Time
lblTime2.Caption = MyTime
End Sub
'This Crashes
What am I doing wrong??
If I set the Dim MyTime as Time it still crashes with the following message:
Compile Error: Function or interface marked as restricted or the function
uses an automation type not supported in Visual Basic.
.
- Follow-Ups:
- Re: Time Function Problem
- From: Jeff Johnson
- Re: Time Function Problem
- From: Bob Butler
- Re: Time Function Problem
- Prev by Date: Re: fastest way to change case of string
- Next by Date: Re: Using bitwise
- Previous by thread: fastest way to change case of string
- Next by thread: Re: Time Function Problem
- Index(es):
Relevant Pages
|