Consulting

Results 1 to 2 of 2

Thread: VBA code for adding a new value in data range using user form

  1. #1
    VBAX Newbie
    Joined
    Mar 2018
    Posts
    1
    Location

    VBA code for adding a new value in data range using user form

    I have created a userform based on lists present in excel.

    Case 1. Combobox Cateogary , allows user to select from drop down . The drop down contains list like Fruits , Vegetables etc.
    I want to allow the user to add new values to this drop down. So if the user manually types in say Beverages
    There is a pop which says : Do you want to add this new value. If he selects yes. then that value starts showing in drop down.
    It also means that the Beverage is added to the list in row source in excel in the end of the list.

    Case 2.There is another Combobox Risk SubCateogary. If so if user selects Cateoagry= Fruits , a dependant list is shown in SubCateogary. It has dropdown like Apple,Mango etic. This is done using case rules to create a dependancy.

    Now if the user adds something new to Catoegary , say beverage , he should add something to Subcateogary.
    And this new value should get added by creating a new list, new names etc.

    Case 3. If user selects Sub-Cateogary ( Apple existing in list) , user should be allowed to add a new value in this sub catoegary say : Kiwi without affecting the dependancy

    Can someone share a code for same? I tried listindex etc but unable to make a headway.

  2. #2
    VBAX Tutor MINCUS1308's Avatar
    Joined
    Jun 2014
    Location
    UNDER MY DESK
    Posts
    254
    Can you share your workbook?
    - I HAVE NO IDEA WHAT I'M DOING

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •