+ Reply to Thread
Results 1 to 2 of 2

How to assign VBA code to user form controls

  1. #1
    Registered User
    Join Date
    06-10-2015
    Location
    Dublin
    MS-Off Ver
    2010
    Posts
    1

    How to assign VBA code to user form controls

    Hi all,

    I've created a user form that has a single text box which takes 6 characters in it, this box has been assigned to "Site ID" e.g CE0001.

    In the same form I have three tick boxes that identify three wireless technologies which the user is to tick for each technology that is present on the site in question e.g G09, U09 and U21.

    They also have to tick up to 3 boxes should there be one two or three sectors on this site referred to as Sector A, Sector B and Sector C, some sites will have one sector, some will have just two but most will have three.

    Based on these input combinations, should the user press the enter button below then the VBA will unlock some hidden tabs that correspond to each technology and pre populate a range of cells in the tabs with a text string which is a combination of the Site ID + Technology and Sector ID e.g CE0001U09A3.

    If I can get some pointers on how to assign the text string based upon the user inputs I will be very happy. I can worry about un-hiding the tabs at a later time.

    Any help would be greatly appreciated.

    Many thanks in advance.

    Pedro

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to assign VBA code to user form controls

    Hello Pedro,

    Welcome to the Forum!

    We need more information about what you are doing. The best option is post a copy of your workbook.

    Please redact any sensitive or confidential information before you post the workbook.

    How To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel 2010; Form Controls: Assign keyboard shortcut to list box
    By DavidRoger in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-13-2013, 10:59 PM
  2. How yo add fancy controls to user form
    By sabhay in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-26-2012, 02:38 PM
  3. VBA code to list names of controls on user form?
    By Peter in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2006, 04:40 AM
  4. How to: User Form to assign a user defined range to a macro variab
    By TrevTrav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2005, 04:06 PM

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