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

Thread: How to... embed a user form?

  1. #1
    Board Regular
    Join Date
    May 2002
    Location
    Manchester, England
    Posts
    73
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,

    Can anyone tell me how I embed the 'UserForm1' that I've created into my spreadsheet (sheet1)? Currently to use it i have to go into Visual Basic and 'Run Userform'...

    Cheers

    By the way, I'm still quite new to this VB malarkey

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    You could put:

    Userform1.show

    Into your Worksheet Activate event, or have a button on the sheet with the same code on it

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Location
    Greenwood, SC
    Posts
    677
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Not sure exactly what you mean by embed, but I'll give it a shot.

    If what you want is the form to open when the workbook is opened, it's pretty easy.

    In the VB editor, double-click This Workbook from the project pane. Type the following:

    Private Sub Workbook_Open

    UserForm1.Show

    End Sub

    This will open the userform whenever the worksheet is opened. Check the Excel help files for Event Procedures (since that is what you are using) for more details.

    If this is not what you meant, please clarify and I'll try again...

    K

  4. #4
    Board Regular
    Join Date
    May 2002
    Location
    Manchester, England
    Posts
    73
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Cheers mate - it works a treat!

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
  •