Power Query Course in Spanish
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: VBA Help!!!

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

    Default

    Hi,

    I have 2 worksheets - 1 has refreshing data and the other is a form with insturctions on how to use the form.

    I have created a command button on my form which I want to start another Form (called Userform1 which was done in VBA) I have ripped most of the Module from another xls file and everything else works except this one button.

    Does anyone know how to set it to load the main userform?

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    To load and show it use:

    Private Sub CommandButton1_Click()
    UserForm1.Show
    End Sub

    To just load it use

    Private Sub CommandButton1_Click()
    Load UserForm1
    End Sub

  3. #3
    New Member
    Join Date
    Feb 2002
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    That has worked great.

    I tried the load one earlier but it didn't work but the show one is all I need.

    Cheers

  4. #4
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yes, the Load only Loads an Object into memory but does not make is visible. The Show Method does both if the UserForm is not loaded.



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
  •