Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Userform and execution of macro

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Someone changed my question so here is it again:


    Hello,

    Ik have a relative long Macro that needs to be executed when a userform is displayed.

    First i put the macro code outside the userform, the macro therefore was only executed when the userform was closed.

    After this i put the exact same code in the userform. But now all i get to see is a white userform and excel crashing on it

    any one knows how you should do these two tasks simultaniously?

    my code:

    Sub mysub1()

    Consolform.Show
    ButtonInfra_Click
    Consolform.ConsolLabel2.Caption = "l"
    ButtonProducts_Click
    Consolform.ConsolLabel2.Caption = "ll"
    ButtonProcesses_Click
    Consolform.ConsolLabel2.Caption = "lll"
    ButtonEA_Click
    Consolform.ConsolLabel2.Caption = "llll"
    ButtonCIB_Click
    Consolform.ConsolLabel2.Caption = "llll"
    ButtonRM_Click
    Consolform.ConsolLabel2.Caption = "lllll"

    End Sub

    This didn't work at all, next i put the code inside the userform this caused excel to crash.

    Thanks for helping out.



    --------------------------------------------------------------------------------

  2. #2
    MrExcel MVP
    Colo's Avatar
    Join Date
    Mar 2002
    Location
    Kobe, Japan
    Posts
    1,456
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)

    Default

    Hi. Please look at the link following.
    http://www.mrexcel.com/board/viewtop...4618&forum=2&3

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
  •