ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   display a timer while an ODBDC connection opens. (https://www.excelbanter.com/excel-programming/425269-display-timer-while-odbdc-connection-opens.html)

wynnyderpooh

display a timer while an ODBDC connection opens.
 
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!

Rick Rothstein

display a timer while an ODBDC connection opens.
 
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")

--
Rick (MVP - Excel)


"wynnyderpooh" wrote in message
...
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!



wynnyderpooh

display a timer while an ODBDC connection opens.
 
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

"Rick Rothstein" wrote:

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")

--
Rick (MVP - Excel)


"wynnyderpooh" wrote in message
...
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!





All times are GMT +1. The time now is 09:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com