Type mismatch on Date

Questions and answers about BasicMaker 2018 for Windows
Post Reply
enonod
Posts: 38
Joined: Tue Nov 08, 2016 1:54 pm

Type mismatch on Date

Post by enonod » Tue Dec 03, 2019 1:10 pm

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 » Mon Dec 30, 2019 4:05 pm

It works well for me:

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

please try simply:
MsgBox Date

does it work?

enonod
Posts: 38
Joined: Tue Nov 08, 2016 1:54 pm

Re: Type mismatch on Date

Post by enonod » Tue Feb 18, 2020 4:07 pm

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: 2767
Joined: Fri Nov 21, 2003 4:57 pm
Location: Nürnberg, Germany
Contact:

Re: Type mismatch on Date

Post by martin-k » Tue Feb 18, 2020 4:09 pm

Works just fine here in 32 and 64 bits. Are you running the current revision 974?
Martin Kotulla
SoftMaker Software GmbH

enonod
Posts: 38
Joined: Tue Nov 08, 2016 1:54 pm

Re: Type mismatch on Date

Post by enonod » Tue Feb 18, 2020 4:26 pm

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”