#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Still stuck

Hello world

Still can't find the solution to this problem. I have a userform that shows
for 10 seconds as a splash screen on the workbook_open event. What I would
like to do is have a countdown timer from 10 to 1 to show the user that
something is happening. I can get the textbox to show the intial value but
I am having real problems in getting it to count down so the user can see
the changes! 10 to 1 in under a second! I have looked at the ontime
method, wait, pause method etc but don't seem to be able to get the correct
syntax...

Office 97 and XP home

Mark (InWales)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Still stuck

Mark,
Try this. Put a label on your userform and the following code in the form
activate event.

Private Sub UserForm_Activate()
Dim i
Dim newhour
Dim newminute
Dim newsecond
Dim waittime
For i = 10 To 0 Step -1
newhour = Hour(Now())
newminute = Minute(Now())
newsecond = Second(Now()) + 1
waittime = TimeSerial(newhour, newminute, newsecond)
Application.Wait waittime
DoEvents
Me.Label1 = i
Next
Unload UserForm1
End Sub

Neil

"Mark (InWales)" wrote in message
...
Hello world

Still can't find the solution to this problem. I have a userform that
shows for 10 seconds as a splash screen on the workbook_open event. What
I would like to do is have a countdown timer from 10 to 1 to show the user
that something is happening. I can get the textbox to show the intial
value but I am having real problems in getting it to count down so the
user can see the changes! 10 to 1 in under a second! I have looked at
the ontime method, wait, pause method etc but don't seem to be able to get
the correct syntax...

Office 97 and XP home

Mark (InWales)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Still stuck

Take a look at the OnTime method in help, or here at
www.cpearson.com/excel/ontime.htm


--

HTH

RP

"Mark (InWales)" wrote in message
...
Hello world

Still can't find the solution to this problem. I have a userform that

shows
for 10 seconds as a splash screen on the workbook_open event. What I

would
like to do is have a countdown timer from 10 to 1 to show the user that
something is happening. I can get the textbox to show the intial value

but
I am having real problems in getting it to count down so the user can see
the changes! 10 to 1 in under a second! I have looked at the ontime
method, wait, pause method etc but don't seem to be able to get the

correct
syntax...

Office 97 and XP home

Mark (InWales)




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Still stuck

S T U N N I N G

Thank you very much Neil for your help - excellent!
Mark (InWales)


"Mark (InWales)" wrote in message
...
Hello world

Still can't find the solution to this problem. I have a userform that
shows for 10 seconds as a splash screen on the workbook_open event. What
I would like to do is have a countdown timer from 10 to 1 to show the user
that something is happening. I can get the textbox to show the intial
value but I am having real problems in getting it to count down so the
user can see the changes! 10 to 1 in under a second! I have looked at
the ontime method, wait, pause method etc but don't seem to be able to get
the correct syntax...

Office 97 and XP home

Mark (InWales)



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorry but i am stuck again KODIAK BEAR New Users to Excel 5 October 1st 07 08:46 PM
Im stuck again... Meader Excel Discussion (Misc queries) 2 May 29th 07 01:23 AM
HELP!! It's STuck ConfusedNHouston Excel Discussion (Misc queries) 1 June 16th 06 10:16 PM
stuck darkbearpooh1 Excel Worksheet Functions 7 February 10th 06 10:21 PM
Ok now im stuck Jonathan Excel Programming 2 June 29th 04 01:06 PM


All times are GMT +1. The time now is 06:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"