ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Timer (https://www.excelbanter.com/excel-programming/364107-timer.html)

Steve

Timer
 
Just a quick question.

I found how to doa timer by search on here which works really well.

However, can't seem to format it so it only says "7 seconds" as opposed to
"7.123456 seconds"

Any help would be appreciated.

Thanks
--
Steve R

Paul Lautman

Timer
 
Steve wrote:
Just a quick question.

I found how to doa timer by search on here which works really well.

However, can't seem to format it so it only says "7 seconds" as
opposed to "7.123456 seconds"

Any help would be appreciated.

Thanks


I assume that this value is in a cell? If so how is that cell currently
formatted? Could you format the cell as Number with no decimal places?



Steve

Timer
 
Sorry Paul, should have explained.

It's in a msgbox

Cheers
--
Steve R


"Steve" wrote:

Just a quick question.

I found how to doa timer by search on here which works really well.

However, can't seem to format it so it only says "7 seconds" as opposed to
"7.123456 seconds"

Any help would be appreciated.

Thanks
--
Steve R


Bob Phillips

Timer
 
Use Format(nTime,0) in the time display.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Steve" wrote in message
...
Just a quick question.

I found how to doa timer by search on here which works really well.

However, can't seem to format it so it only says "7 seconds" as opposed to
"7.123456 seconds"

Any help would be appreciated.

Thanks
--
Steve R




Paul Lautman

Timer
 
Steve wrote:
Sorry Paul, should have explained.

It's in a msgbox

Cheers

Just a quick question.

I found how to doa timer by search on here which works really well.

However, can't seem to format it so it only says "7 seconds" as
opposed to "7.123456 seconds"

Any help would be appreciated.

Thanks
--
Steve R


OK we know where we are looking now! Somewhere in the VB script there will
be the msgbox command and it will have as its first parameter either a
variable or a calculation. Enclose this variable/calculation in the format
function thus:

MsgBox Format(22 / 7, "#")

the above displays 3




All times are GMT +1. The time now is 02:31 AM.

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