+ Reply to Thread
Results 1 to 4 of 4

Using a combobox without overwriting existing data

  1. #1
    Registered User
    Join Date
    08-15-2007
    Location
    Houston, TX
    Posts
    55

    Cool Using a combobox without overwriting existing data

    I have a worksheet containing employee information (i.e. name, manager, department, etc.). I also have a userform that will be used to make changes to the employee information. The userform has three comboboxes and, when activated, the userform is populated with the existing data in the worksheet.

    Here is the problem - I need to have the existing worksheet data populate (as it does now) but also have the combobox choices available in the event that one of the 'combo' fields need to be changed. How do I keep the existing worksheet data AND keep the functionality of the combobox?

    Does this make sense? I feel like I'm rambling!
    Last edited by pleiadeez7; 10-13-2008 at 08:41 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Not really clear on what is being populated. Is it the comboboxes (in which case why isn't the data available in them), or do the selections from the comboboxes put the relevant data somewhere else on the form then clear out the comboboxes?

    Maybe an example file to clarify your situation.

    rylo

  3. #3
    Registered User
    Join Date
    08-15-2007
    Location
    Houston, TX
    Posts
    55

    Using a combobox without overwriting existing data

    Hi rylo - thanks for getting back to me. A test spreadsheet is attached. Once you open the spreadsheet, go to VBA and the 'changeemployeeform' should be displayed. The form has three comboboxes; manager, status, and category. If you run the form you will see that the first employee in the list shows up in the userform minus the manager, status, and category fields. If you move the userform to see the data beneath you will see that the manager, status, and category fields for the existing employees have data that does not populate in the user form.

    When the userform is activated I would like for it to display all data for each employee yet have the combobox options available in the event that the existing data needs to change.

    I hope it will be clearer once you see the form run. =)

    Thanks for taking a look!

    Janet
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Janet

    In your code Sub UserForm_Activate add another row before the end
    Please Login or Register  to view this content.
    I've just followed your data loading process just to give you the idea. You have loaded the comboboxes with data, you just have to select the relevant item for the record selected.

    HTH

    rylo

+ 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. Dynamic Historical Data Formula
    By buddhajb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-26-2008, 04:00 AM
  2. Userform problem adding to existing rows of data
    By glenness in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-20-2007, 09:59 PM
  3. importing data:What i would like to do is be able to import
    By censura in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2007, 08:32 AM
  4. Pasting cell range to make selections from existing combobox listings
    By darmstrong in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2007, 09:48 AM
  5. Unlinking Imported Data
    By Donquick in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-15-2007, 09: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