+ Reply to Thread
Results 1 to 4 of 4

Change Text message within UserForm

  1. #1
    Registered User
    Join Date
    01-05-2007
    Location
    West Chicago
    MS-Off Ver
    2010
    Posts
    12

    Change Text message within UserForm

    My client had me write a macro that has lots of facets. So many that it takes a few minutes to run. I want to provide the client with a display that changes with each function that is called.

    The title of the box would say, “CURRENT PROCESS” and the message would display that process being performed.

    I can do this by creating a UserForm for each process but that would require me to maintain one for each process. If I create a new process I would have to create a new UserForm.

    Dave Ó¿Õ

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Dave you don't need a form for userform for each process.

    You can have one form that displays a text message which is changed by each process.

    example code

    UserForm1.Label1.Caption = "Please Wait"
    UserForm1.Repaint


    Also have a look at
    Application.StatusBar in the Help File

  3. #3
    Registered User
    Join Date
    01-05-2007
    Location
    West Chicago
    MS-Off Ver
    2010
    Posts
    12

    Change Text message within UserForm

    You gave me just what I asked for. It changes the label to display the current process that is taking place.

    I was mistaken in thinking that the program would continue. Instead, as it does not have any controls other than the label itself it stops until you click the X in the upper right corner of the box. Then it continues to the next function where it stops at the next UserForm.

    How can I get the program to continue running with the UserForm displayed?

    Dave Ó¿Õ

  4. #4
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    You will need to add a new macro that you run 1st.

    This macro will need to show the form.
    As part of the form you will need to add a UserForm_Activate macro that calls the macro that you currently run to start your process

    Private Sub UserForm_Activate()
    Call MyMacro
    End Sub

    You then add the following commands with suitable text messages through out your macro.

    UserForm1.Label1.Caption = "Please Wait"
    UserForm1.Repaint

+ 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