+ Reply to Thread
Results 1 to 4 of 4

Ok button runs code 17 times w/o loop.... Why?

  1. #1
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Angry Ok button runs code 17 times w/o loop.... Why?

    Hi Gurus

    The code you see below is linked to OkButton_Click. This code inputs to next empty row values from userform. On userform I have two comboboxes. The firstcombobox ( Seller_Name_Combo_Change) ads items to second combo when changes. Added items are unique


    But he problem is that, when I press OkButon, this code runs 17 times with no reason. And I cannot understand why?!

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Ok button runs code 17 times w/o loop.... Why?

    How many items are in your combobox? 17? maybe the change event is triggering this?

  3. #3
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Ok button runs code 17 times w/o loop.... Why?

    For now, maximum items = 2.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Ok button runs code 17 times w/o loop.... Why?

    step through the code and see which other routines are triggered by it
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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