+ Reply to Thread
Results 1 to 1 of 1

Custom Object ?Resursive? Events

  1. #1
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Custom Object ?Resursive? Events

    I have a custom userform Control, clsTwoInput.

    Basically, it is a Frame that contains a CheckBox and two InputBoxes.
    The CheckBox toggles the visibility of the InputBoxes and the clsTwoInput.Value is the .Value of the visible InputBox.

    Each of the InputBoxes is either a TextBox or a clsTwoInput.

    This works fine, until I try to get the clsTwoInput to generate a Change event.

    Here is my current clsTwoInput code.
    When I try to add WithEvents to the declaration of clOneInput, I get an compile error "Cannot handle events for the object specified"
    Please Login or Register  to view this content.
    In the attached user form, OuterInput is a clsTwoInput that has its checkbox, one text box and one clsTwoInput, InnerBox.
    Changing OuterInput by clicking the checkbox or by typing into the checkbox will trigger the OuterInput_Change event, but changing InnerBox will not.

    Is there a way for a custom object, that has a different instance of that object as a property of that object, to receive Events from the sub-instance of itself?
    Attached Files Attached Files
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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. moving chart object and keep object ability for chart events?
    By tdrose01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2014, 06:43 AM
  2. Adding code to events of a control object on-the-fly
    By Mervil in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-29-2010, 02:22 PM
  3. custom events
    By SuitedAces in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-18-2007, 08:46 AM
  4. Shapes object events?
    By Dr.Ile in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-07-2006, 07:10 AM
  5. [SOLVED] object does not source automation events
    By josh7 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-21-2005, 03:05 PM
  6. Using Events with the Application Object & XL 2003
    By Kevin H. Stecyk in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-25-2005, 01:06 PM
  7. [SOLVED] Shapes and Events and Custom Menue
    By Tom G. in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2005, 03:06 PM

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