Results 1 to 5 of 5

Execute code from auto generated buttons in a userform

Threaded View

  1. #1
    Registered User
    Join Date
    04-26-2008
    Posts
    11

    Execute code from auto generated buttons in a userform

    I soon don't have any hair left, so please help me out...

    I have 3 Regions with a number (different between regions) of companies. Via a userform i would like the user to state how many employees each company holds and save this information back to the spreadsheet.

    The attached file descibes my problem.

    1. Via a ComboBox Region A, B or C is choosen.

    2. By clicking the Indata-button the userform isshown. Since each region have different number of companies (cells F33:G54), the userform will have different number of Labels and TextBoxes depending on which region that is choosen.

    When the userform initiates, cells C15:C17, are used to decide what information will be shown in the userform. The Cancel-button and Save-button are also created when the userform initiates.

    By filling in number of employees and clicking the Save-button, the number of employees should be written to cell H34:H54.

    By clicking the Cancel-button, the userform should just be unloaded.


    I can not get this to work!

    1. How do I get the Cancel-button and Save-button to work? I can not get them to execute any code.
    2. How do I get the information in the textboxes (number of employees) to be written into the worksheet.

    Any ideas on how to solve this are more then wellcome!
    /Fredrik
    Attached Files Attached Files
    Last edited by Tellus; 08-27-2008 at 07:19 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adding code to a form on the fly...
    By Ara in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2007, 03:47 PM
  2. To execute code before XL loads.
    By Ricky1947 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2007, 03:27 PM
  3. Removing command buttons using code
    By chalie1105 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2006, 02:25 PM
  4. Muultiple userform 'reset' code question
    By peter.thompson in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-21-2006, 08:23 PM
  5. UserForm Code Question/Help
    By peter.thompson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2006, 02:29 AM

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