Type mismatch on Date

Post Reply
enonod
Posts: 62
Joined: Tue Nov 08, 2016 1:54 pm

Type mismatch on Date

Post by enonod »

Can somebody please say why this (from the Help File)...

Sub Main
MsgBox "Today is " & Date & "."
End Sub

...fails with 'Type mismatch.

Thank you
Valeri Vlassov
SoftMaker Team
SoftMaker Team
Posts: 3
Joined: Mon Dec 30, 2019 4:01 pm

Re: Type mismatch on Date

Post by Valeri Vlassov »

It works well for me:

Sub Main
MsgBox "Today is " & Date & "."
End Sub

please try simply:
MsgBox Date

does it work?
enonod
Posts: 62
Joined: Tue Nov 08, 2016 1:54 pm

Re: Type mismatch on Date

Post by enonod »

Thank you Valeri, sorry for the delay due to my being indisposed.
I tried your suggestion

Sub Main
MsgBox Date
End Sub

and oddly still get error on line 2: Type mismatch
Perhaps there is some kind of setting in Basicmaker causing this.
martin-k
SoftMaker Team
SoftMaker Team
Posts: 3083
Joined: Fri Nov 21, 2003 4:57 pm
Location: Nürnberg, Germany
Contact:

Re: Type mismatch on Date

Post by martin-k »

Works just fine here in 32 and 64 bits. Are you running the current revision 974?
Martin Kotulla
SoftMaker Software GmbH
enonod
Posts: 62
Joined: Tue Nov 08, 2016 1:54 pm

Re: Type mismatch on Date

Post by enonod »

Thank you for your reply. Yes 974.0203 64bit
Really baffled
EDIT
just tried the following from another post and get the same on line 6

Dim pm as Object
Set pm = CreateObject("PlanMaker.Application")
pm.Application.Visible = True
pm.Workbooks.Add

pm.ActiveSheet.Range("A1:A1").Item(1, 1).Value = date

dateFromCell = pm.ActiveSheet.Range("A1:A1").Item(1, 1).Value
MsgBox "dateFromCell is " & dateFromCell

Set pm = Nothing
Post Reply

Return to “BasicMaker 2018 for Windows”