Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default display userform for 10 seconds

Hi
I am trying to have a UserForm display for 10 seconds and then have the rest
of my sub proceed.


have tried

********
frmPrime.Show
Application.Wait Now + TimeValue("00:00:10")
frmPrime.Hide
********

but this just stops the code permanently. Any ideas?
Sandy

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default display userform for 10 seconds

Hi Sandy
Just amend this line:
frmPrime.Show vbModeless

HTH
Cordially
Pascal

"Sandy" a écrit dans le message de news:
...
Hi
I am trying to have a UserForm display for 10 seconds and then have the
rest of my sub proceed.


have tried

********
frmPrime.Show
Application.Wait Now + TimeValue("00:00:10")
frmPrime.Hide
********

but this just stops the code permanently. Any ideas?
Sandy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default display userform for 10 seconds

Try this:
UserForm object:
Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:10"), "KillTheForm"
End Sub

Kill Module
Private Sub KillTheForm()
Unload UserForm1
End Sub

I use this for making welcome splashes in certain programs. The
UserForm_Activate occurs when the userform is triggered by an event. The
userform will display for 10 seconds (as per OP), and the KillTheForm
procedure kicks in, which unloads the userform.
--
I am running on Excel 2003, unless otherwise stated. Please rate posts so we
know when we have answered your questions. Thanks.


"Sandy" wrote:

Hi
I am trying to have a UserForm display for 10 seconds and then have the rest
of my sub proceed.


have tried

********
frmPrime.Show
Application.Wait Now + TimeValue("00:00:10")
frmPrime.Hide
********

but this just stops the code permanently. Any ideas?
Sandy


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default display userform for 10 seconds

Hi guys

Both work very well with the exception that the information on the userform
(labels) does not display - any ideas why this should happen?

Sandy

"Sandy" wrote in message
...
Hi
I am trying to have a UserForm display for 10 seconds and then have the
rest of my sub proceed.


have tried

********
frmPrime.Show
Application.Wait Now + TimeValue("00:00:10")
frmPrime.Hide
********

but this just stops the code permanently. Any ideas?
Sandy


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default display userform for 10 seconds

What does this userform do?
--
I am running on Excel 2003, unless otherwise stated. Please rate posts so we
know when we have answered your questions. Thanks.


"Sandy" wrote:

Hi guys

Both work very well with the exception that the information on the userform
(labels) does not display - any ideas why this should happen?

Sandy

"Sandy" wrote in message
...
Hi
I am trying to have a UserForm display for 10 seconds and then have the
rest of my sub proceed.


have tried

********
frmPrime.Show
Application.Wait Now + TimeValue("00:00:10")
frmPrime.Hide
********

but this just stops the code permanently. Any ideas?
Sandy





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default display userform for 10 seconds

It is meant to simply display a message - "For further information refer to
bla bla" - for 10 seconds.
Sandy

"Orion Cochrane" wrote in message
...
What does this userform do?
--
I am running on Excel 2003, unless otherwise stated. Please rate posts so
we
know when we have answered your questions. Thanks.


"Sandy" wrote:

Hi guys

Both work very well with the exception that the information on the
userform
(labels) does not display - any ideas why this should happen?

Sandy

"Sandy" wrote in message
...
Hi
I am trying to have a UserForm display for 10 seconds and then have the
rest of my sub proceed.


have tried

********
frmPrime.Show
Application.Wait Now + TimeValue("00:00:10")
frmPrime.Hide
********

but this just stops the code permanently. Any ideas?
Sandy



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default display userform for 10 seconds

Make a label in the form big enough to display this message. Or you could
have a message box at the beginning of your code with the message. Once the
user clicks OK, the procedure will run. This may actually save time in that
the message box will not display for 10 seconds. Here's a sample of the
message box:
Sub Macro()
MsgBox "Your message here"
'Your code here
End Sub

The MsgBox will default to an OK button only if you copy my line to your
macro. I think the MsgBox route would be better, but I could be wrong.
--
I am running on Excel 2003, unless otherwise stated. Please rate posts so we
know when we have answered your questions. Thanks.


"Sandy" wrote:

It is meant to simply display a message - "For further information refer to
bla bla" - for 10 seconds.
Sandy

"Orion Cochrane" wrote in message
...
What does this userform do?
--
I am running on Excel 2003, unless otherwise stated. Please rate posts so
we
know when we have answered your questions. Thanks.


"Sandy" wrote:

Hi guys

Both work very well with the exception that the information on the
userform
(labels) does not display - any ideas why this should happen?

Sandy

"Sandy" wrote in message
...
Hi
I am trying to have a UserForm display for 10 seconds and then have the
rest of my sub proceed.


have tried

********
frmPrime.Show
Application.Wait Now + TimeValue("00:00:10")
frmPrime.Hide
********

but this just stops the code permanently. Any ideas?
Sandy



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
display userrform label for x seconds Gary Keramidas Excel Programming 3 August 24th 06 04:07 AM
How to display seconds on time stamp? uosam Excel Worksheet Functions 1 February 28th 06 09:05 PM
Close userform after 2 seconds Kent Excel Programming 1 January 17th 06 02:17 PM
display no seconds in time format [h] Finolac Excel Discussion (Misc queries) 1 October 3rd 05 03:19 PM
display minutes and seconds in excel Jonathan Blundell Excel Worksheet Functions 1 September 10th 05 01:26 PM


All times are GMT +1. The time now is 03:34 AM.

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

About Us

"It's about Microsoft Excel"