Can somebody please say why this (from the Help File)...
Sub Main
MsgBox "Today is " & Date & "."
End Sub
...fails with 'Type mismatch.
Thank you
Type mismatch on Date
-
- SoftMaker Team
- Posts: 3
- Joined: Mon Dec 30, 2019 4:01 pm
Re: Type mismatch on Date
It works well for me:
Sub Main
MsgBox "Today is " & Date & "."
End Sub
please try simply:
MsgBox Date
does it work?
Sub Main
MsgBox "Today is " & Date & "."
End Sub
please try simply:
MsgBox Date
does it work?
Re: Type mismatch on Date
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.
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.
-
- SoftMaker Team
- Posts: 3103
- Joined: Fri Nov 21, 2003 4:57 pm
- Location: Nürnberg, Germany
- Contact:
Re: Type mismatch on Date
Works just fine here in 32 and 64 bits. Are you running the current revision 974?
Martin Kotulla
SoftMaker Software GmbH
SoftMaker Software GmbH
Re: Type mismatch on Date
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
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