+ Reply to Thread
Results 1 to 2 of 2

how to make a form self disappear

  1. #1
    Ben
    Guest

    how to make a form self disappear

    Hi all,

    I am using Excel 2002. I would like to display a form when a worksheet is
    activated. But after a few seconds have elapsed, I would like the form to
    unload itself. Can you please share with how I can accomplish this? Thanks.

    Ben


    --


  2. #2
    Chip Pearson
    Guest

    Re: how to make a form self disappear

    In the form's code module, use

    Private Sub UserForm_Initialize()
    Application.OnTime Now + TimeSerial(0, 0, 5), "HideForm", ,
    True
    End Sub

    Change the '5' to the number of seconds you want to display the
    form.

    In a standard code module,

    Sub HideForm()
    UserForm1.Hide
    End Sub


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "Ben" <[email protected]> wrote in message
    news:[email protected]...
    > Hi all,
    >
    > I am using Excel 2002. I would like to display a form when a
    > worksheet is
    > activated. But after a few seconds have elapsed, I would like
    > the form to
    > unload itself. Can you please share with how I can accomplish
    > this? Thanks.
    >
    > Ben
    >
    >
    > --
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1