dynamic date

15 views
Skip to first unread message

geebee

unread,
Jan 24, 2018, 10:11:26 AM1/24/18
to Twebst
Hi.  I have the following:


Option Explicit
Dim core
Dim browser
Set core    = CreateObject("OpenTwebst.Core")
Set browser = core.StartBrowser("sitepath here")

Dim DT As String
DT = Format(Now(), "mm/dd/yyyy")


Call browser.FindElement("input text", "id=controlNAME").InputText(DT)

but I am getting an "expected end of statement/compilation error" message

Please help.

Thanks



geebee

unread,
Jan 24, 2018, 1:03:54 PM1/24/18
to Twebst
nevermind

Ashok Karkera

unread,
Mar 13, 2018, 3:17:35 PM3/13/18
to Twebst
When you define in vbs ... don't use "as string"

eg :
Dim dp
dp = Datepart("d",Now()) & "-" & MonthName(Month(Now()),1) & "-" & Year(Now())

(that's for a dd-mmm-yyyy format )
Reply all
Reply to author
Forward
0 new messages