Date Function Doesn't Exist

Geezer

Registered User.
Local time
Tomorrow, 05:25
Joined
Jul 14, 2008
Messages
62
Most confussed.

Have attached the following code to a form:

Private Sub CmdToday_Click()

Dim TodayDate
TodayDate = Date

Me.InputDate.Value = TodayDate

End Sub


Button works great on my machine, updates the field its meant to. Thing is, on two other machines this code doesn't work. I've even tried adding =Date() to the Default Value in the InputDate field and only get a #Name? returning.

Have also tried a macro using the same function Date(), get an error saying something along the lines of "function doesn't exist....".

All three options work 100% on my machine.

Any clues?
 
Should Add

One of the other PCs is running Microsoft Viewer, which crashes with a run-time error when I use code.

The second machine I've been able to fix as there was a missing Reference, which I unticked and the code work just fine.

As the first machine with the Viewer cannot open the code I went through Excel and found no similar missing References.
 
All Sorted

Thanks, great reference and just what I needed. The PC with the Viewer had a missing snapshot.ocx file which I downloaded.

They both work 100% now.

Thx again.
 

Users who are viewing this thread

Back
Top Bottom