+ Reply to Thread
Results 1 to 7 of 7

Form Click Event firing unexpectedly when a sheet is copied/moved into workbook

  1. #1
    Registered User
    Join Date
    07-26-2016
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Form Click Event firing unexpectedly when a sheet is copied/moved into workbook

    Hello,

    Users are complaining that a workbook (that contains a Click Event ComboBox) keeps debugging.

    It appears that when the users copy or move sheets from another workbook into the workbook with the code in, then the Click Event is activated - even though no user interaction has occurred in terms of the combo box.

    Can anyone suggest a solution as I am going crazy with this?!

    Thank you

    Neil

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Form Click Event firing unexpectedly when a sheet is copied/moved into workbook

    Neil

    Where is the combobox located and how is it populated?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-26-2016
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Form Click Event firing unexpectedly when a sheet is copied/moved into workbook

    Thanks Norie (great name by the way)

    The combobox appears on its own in a worksheet.

    It is populated by using the Properties (right click..> Properties) for the ComboBox by setting a range for the data in the "ListFillRange" property

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Form Click Event firing unexpectedly when a sheet is copied/moved into workbook

    Are you using a dynamic named range for the ListFillRange?

  5. #5
    Registered User
    Join Date
    07-26-2016
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Form Click Event firing unexpectedly when a sheet is copied/moved into workbook

    Are you referring to a defined name range? If so yes I am using a defined name rather than the 'vanilla' method of setting a cell range reference.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Form Click Event firing unexpectedly when a sheet is copied/moved into workbook

    Neil

    What could be happening is that when the user is copying/moving worksheets the named range is bring recalculated and that is triggering the combobox's click event.

    If that is what's happening you could avoid it by populating the combobox using code.

    For example you could put something like this in the module of the sheet the combobox is on.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-26-2016
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Form Click Event firing unexpectedly when a sheet is copied/moved into workbook

    That's amazing, you've solved it! Thank you so much Norie.

    Neil

+ 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. Workbook SheetChange event not firing
    By kmakjop in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-30-2015, 11:11 AM
  2. ActiveX change event firing in sheet destructor when object already out of scope
    By andre.hendriks in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-09-2014, 05:13 AM
  3. [SOLVED] Before double click event with if statements (Double clicking blank cell stops bdc firing)
    By camdenpars in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-27-2014, 09:03 AM
  4. Stop exit event of textbox firing when click a command button to close a userform
    By chrisjames25 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-18-2013, 09:27 AM
  5. Neither the form initialzation or activate event are firing.
    By gvag in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2013, 04:41 PM
  6. [SOLVED] Userform multipage control - exit event not firing or event order
    By jane serky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2013, 10:23 AM
  7. Workbook where info is copied and moved w/ VBA
    By juniperjacobs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-06-2011, 06:44 PM

Tags for this Thread

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