display a timer while an ODBDC connection opens.

  • Thread starter Thread starter wynnyderpooh
  • Start date Start date
W

wynnyderpooh

My code is:

Dim strDate2 As String
TextBox1 = Val("_" & Format(Second(Time), "00"))

I have attempted to populate Textbox1 with workbook, on open and with form,
initialize. All I get is 0 or the literal string

Also, as soon as the connection opens I want to close the form.

Thanks!
 
The underbar character is interfering with the Val function's ability to
show the number (because it is not a number and Val stops evaluating numbers
at the first non-digit that is not a US decimal point). Why are you even
using the Val function? Just do this...

TextBox1 = Format(Second(Time), "_00")
 
Thanks Rick,
I changed the textbox to a label. I need the label to display an active
timer. I am attempting to use the code:

lblTmr = Format(Second(Time), "00")
Application.Wait TimeValue("00:00:01") this is locking up
lblTmr = lblTmr + TimeValue("00:00:01") this is not working

Suggestions?

Thanks again,
Jim
 
Back
Top