+ Reply to Thread
Results 1 to 2 of 2

Add event handling to TreeView added at runtime

  1. #1
    Registered User
    Join Date
    07-24-2015
    Location
    Toledo, OH
    MS-Off Ver
    Microsoft Office 2010
    Posts
    85

    Add event handling to TreeView added at runtime

    Okay, folks, I am sick of this problem and I need help solving it.

    I have a workbook that is shared throughout my workplace. It has a userform (one of many) that has two TreeView controls. These TreeView controls are vital to the process of this workbook. For some reason that I cannot fathom, these two TreeView controls will occasionally delete themselves after other users have opened and used the workbook. And I don't mean that they have shrunk to miniscule sizes so you can't see them, or that they have gone invisible. I mean they're GONE. They are gone when I open the userform in VBA. I don't know why this happens. There is no way a user is going into VBA deliberately and deleting them, because no one in my plant even knows what VBA is, let alone how to find a userform and delete a TreeView from it. These people don't even know how to insert a table!

    I am fed up with trying to figure out why this is happening; all internet searches regarding the problem have been useless. Right now I've added code to the Userform Initialize event that checks for the TreeViews' existence, and gives a warning message for the user to contact me if it can't find them, then closes the userform. I did this to keep the code from crashing, but it's obviously not fixing the problem, only telling the user to warn me if the problem has occurred to I can go in and re-insert the TreeViews for the nine hundredth time in a week.

    SO. Since I have not come up with a way to prevent the TreeViews from deleting themselves after two straight weeks of searching, I have decided to add the stupid things at runtime and add event handling to them at that point. I mean, what else am I supposed to do? Unless one of you folks can explain to me why this is happening so I can keep them from deleting themselves, I don't have much of a choice.

    I know how to add a TreeView at runtime. What I don't know how to do is add event handling to it at runtime. Would someone please explain to me how to do this? Or explain to me why they're deleting themselves in the first place???

  2. #2
    Registered User
    Join Date
    07-24-2015
    Location
    Toledo, OH
    MS-Off Ver
    Microsoft Office 2010
    Posts
    85

    Re: Add event handling to TreeView added at runtime

    Please, guys, I really need help with this.

+ 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. Event Handling for controls created at runtime
    By jerseyguy1996 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-12-2013, 01:57 AM
  2. [SOLVED] Excel VBA event handling
    By vangxbg in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-06-2013, 03:25 PM
  3. Click events not working when added during runtime
    By crazybass2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-10-2006, 11:09 AM
  4. [SOLVED] Manipulate Controls added at runtime
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-17-2006, 05:55 AM
  5. [SOLVED] MatchEntry for combobox added during runtime
    By Claus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-13-2005, 08:05 AM
  6. [SOLVED] On Event calendar with error handling?
    By Chip in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2005, 07:05 PM
  7. add event to controls added in runtime
    By Brotha lee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2005, 06:06 AM
  8. [SOLVED] Event handling...
    By Alex in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-29-2005, 03:14 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