+ Reply to Thread
Results 1 to 3 of 3

Deleting a row, run Combobox change event

  1. #1
    Registered User
    Join Date
    11-13-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    12

    Deleting a row, run Combobox change event

    This is also posted on MrExcel but I see no way to attach an example:

    I have a list of inventory
    Each item has a Category associated with it

    I made a pivottable to list all the unique categories (To get rid of duplicates)
    I NameRanged that table as Category

    I created an activex combobox and called the ListNameRange "Category"
    Now all the items from that pivot table appear on my combobox
    I have the selection from that combobox get entered into another cell "AC1"
    On the Change event of the Combobox, I have a filter to filter the column by whatever is in AC1 (same value as selected on the combobox)
    I then have a button next to the combobox that removes the filter and all the items show.

    This all works PERFECTLY........................until

    I go to delete a row in the entire list and the Change event of the combobox runs and it runs the filter. Essentially taking my entire list and shrinking it down to the item displayed in the combobox

    I'm lost! I wish I could explain better but I cant.
    Attached is a stripped down version

    The pivot table is all the way over in the AB column

    On a Side Note, I found this elsewhere, but I tried it but I think I failed in understanding.

    1) Delete ListFillRange property from the Property Box.
    2) to ThisWorkbook module
    Code
    Private Sub Workbook_Open()
    Application.Run "Sheet1.Worksheet_Activate"
    End Sub

    3) to Sheet1 module
    Code
    Private Sub Worksheet_Activate()
    Me.ComboBox1.List = Range("b6:b10").Value
    End Sub
    Attached Files Attached Files
    Last edited by jschneiter2; 09-01-2020 at 12:24 PM.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: Deleting a row, run Combobox change event

    Each time you delete you are triggering the worksheet_change event

  3. #3
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,102

    Re: Deleting a row, run Combobox change event

    It seems to me you could run the code from a command button and get rid of the change event routine?

+ 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. [SOLVED] Issue ComboBox change event
    By Grilleman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-25-2019, 10:16 AM
  2. Multiple Combobox Change Event
    By brainzlp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-29-2019, 06:05 AM
  3. How to get Combobox change event to execute
    By kaseyleigh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-03-2015, 05:58 AM
  4. Combobox change event
    By buhwheet in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2015, 10:39 AM
  5. Change event for comboBox
    By cmpcwil2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2006, 10:01 AM
  6. [SOLVED] Combobox change event only by UI
    By Excelerate-nl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-02-2006, 11:10 AM
  7. MsgBox in Enter event causes combobox not to run Change event
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2006, 10:55 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