Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Counter for Msgbox

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a message box output when I click a button. I want the message box to act as a counter say, it counts 3, 2, 1 then the msg box automatically goes. So, it is acting as a countdown. Is this possible?

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-15 03:18, BenNV wrote:
    I have a message box output when I click a button. I want the message box to act as a counter say, it counts 3, 2, 1 then the msg box automatically goes. So, it is acting as a countdown. Is this possible?
    Do you mean a timed msgbox where by it displays for 3 secs then cancels and takes a default setting ??

    Kind Regards,
    Ivan F Moala From the City of Sails

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks for the reply.

    Yes, I just want a 3 second timer and after the 3 secs, the msg box goes and goes back to the workbook without any changes. Like a wait 3 seconds command.

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    London, UK
    Posts
    167
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    no, you cannot change the msgbox text once it is shown, or cancel the dialog programmatically.

    your best bet is to create a small userform with just a text label on it, then use this form to do what you want.

    <table style="background-color:#0e54be" cellspacing="1" cellpadding="2"><td style="background-color:#ceffff;font-family:arial;color:#072c63;font-size:8pt;"> DALEY :P </td></table>

  5. #5
    Board Regular
    Join Date
    Mar 2002
    Location
    Connecticut
    Posts
    181
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm not sure if this would work with a message box. But if you could use a "userform" instead, you can use this code in the userform:

    Private Sub UserForm_Activate()
    Application.Wait Now + TimeValue("00:00:03")
    Userform1.Hide
    End Sub

  6. #6
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-15 06:18, daleyman wrote:
    no, you cannot change the msgbox text once it is shown, or cancel the dialog programmatically.

    your best bet is to create a small userform with just a text label on it, then use this form to do what you want.
    Yes you can cancell a msgbox programatically
    You have to use the Address of functon and
    the system Timer.



    Kind Regards,
    Ivan F Moala From the City of Sails

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •