Why doesn't any of my VBScript work?

M

Marion

I am new to using InfoPath and I have been reading a lot of the posts. But
when I attempt any of the suggestions none of my VBScript works. In the
example below it doesn't like the use of Date. What do I need to know to make
VBScript work in InfoPath. What makes it different? Here is an example:

Sub XDocument_OnLoad(eventObj)
Dim objDate
dim d

set d = Date
Set objDate = XDocument.DOM.selectSingleNode("//my:myFields/my:field1")
objDate.text = "20060315111522"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top