+ Reply to Thread
Results 1 to 5 of 5

Calling a userform from Excel

  1. #1
    Registered User
    Join Date
    05-18-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Calling a userform from Excel

    I've had some help from another forum that I shall not name but I stopped receiving replies. I just need to know how to call up a UserForm from Excel. I will attach the workbook I'm using and post all code here. Thanks in advance for any help.

    The attached has this in the userform's code module

    VBA:
    Please Login or Register  to view this content.

    And this in Sheet 1's code module

    VBA:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Blitskrieg; 05-21-2010 at 02:26 PM. Reason: Code syntax.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,954

    Re: Calling a userform from Excel

    Put a commandbutton on sheet1 and assign the macro:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    05-18-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Calling a userform from Excel

    Quote Originally Posted by protonLeah View Post
    Put a commandbutton on sheet1 and assign the macro:
    Please Login or Register  to view this content.
    Thanks for the reply. I was really hoping this was a last resort kind of option. Ideally the UserForm would be displayed when certain numbers are entered into the first column. Hence the Worksheet change piece of code. So when a number that for the example is listed in Column I, is entered into Column A, display my UserForm and bring the value of the combo box back two columns over.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Calling a userform from Excel

    What's the point? Use Data Validation List

    What's this line supposed to do,it wouldn't work without a selection being made?
    Please Login or Register  to view this content.
    Also,don't add error handlers until the code is working
    Attached Files Attached Files
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    05-18-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Calling a userform from Excel

    This works great thanks!

+ 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