+ Reply to Thread
Results 1 to 3 of 3

execution subs not in logical order ?

  1. #1
    Pierre via OfficeKB.com
    Guest

    execution subs not in logical order ?

    Hi experts,

    I have this simple code when the user click a button on a multipage userform;

    Private Sub but_bereken_alles_Click()
    lbl_momentje.Visible = True
    maxstaffelbepaling
    budget_neutraal_berekenen_franchise
    nieuwe_eb_vullen
    MultiPage1.Value = 3
    lbl_momentje.Visible = False
    End Sub

    It should have the label lbl_momentje appear when the button is clicked
    because all the sub that have to be calculated take about 6-7 seconds to
    complete.
    However, it first does the sub 'maxstaffelbepaling' and then it shows the
    label.

    Does anyone of you have a solution please ? I want to show the label first
    and then execute the subs..
    Thanks,
    Pierre


    --
    Message posted via http://www.officekb.com

  2. #2
    Rody Meulman
    Guest

    Re: execution subs not in logical order ?

    Try DoEvents after making the label visible.

    Met vriendelijke groet,

    Rody


    "Pierre via OfficeKB.com" <u13950@uwe> schreef in bericht
    news:567a21d2d1c2d@uwe...
    > Hi experts,
    >
    > I have this simple code when the user click a button on a multipage
    > userform;
    >
    > Private Sub but_bereken_alles_Click()
    > lbl_momentje.Visible = True
    > maxstaffelbepaling
    > budget_neutraal_berekenen_franchise
    > nieuwe_eb_vullen
    > MultiPage1.Value = 3
    > lbl_momentje.Visible = False
    > End Sub
    >
    > It should have the label lbl_momentje appear when the button is clicked
    > because all the sub that have to be calculated take about 6-7 seconds to
    > complete.
    > However, it first does the sub 'maxstaffelbepaling' and then it shows the
    > label.
    >
    > Does anyone of you have a solution please ? I want to show the label first
    > and then execute the subs..
    > Thanks,
    > Pierre
    >
    >
    > --
    > Message posted via http://www.officekb.com




  3. #3
    Pierre via OfficeKB.com
    Guest

    Re: execution subs not in logical order ?

    Thanks Rody,
    This works wonderfully !
    Pierre

    Rody Meulman wrote:
    >Try DoEvents after making the label visible.
    >
    >Met vriendelijke groet,
    >
    >Rody
    >
    >> Hi experts,
    >>

    >[quoted text clipped - 20 lines]
    >> Thanks,
    >> Pierre



    --
    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...mming/200510/1

+ 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