Howdy!

I am trying to figure out DHTML. I get an error when I use this code: WHY?

Private Function Store_onclick() As Boolean
PutProperty BaseWindow.Document, "Property1",TxtField1.Value
End Function

The .Bas file is fine
Public Sub PutProperty(objDocument As HTMLDocument, strName As String, vntValue As Variant, Optional Expires As Date)

objDocument.cookie = strName & "=" & CStr(vntValue) & _
IIf(CLng(Expires) = 0, "", "; expires=" & Format(CStr(Expires), "ddd, dd-mmm-yy hh:mm:ss") & " GMT") ' & _

End Sub

Thanx