+ Reply to Thread
Results 1 to 10 of 10

Userform object not found after period of inactivity

  1. #1
    Registered User
    Join Date
    05-14-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2007
    Posts
    31

    Userform object not found after period of inactivity

    I'm going to be skimpy on the details here because I have to hurry off but I will add more if necessary.

    Put simply, I have a userform activated by an ActiveX button. Click button, form opens, no problem.

    I'm finding that when the workbook is open for some time and just sitting there, no changes or edits being made, if I try to click the button and open the userform again, I get an "object not found" message, often followed by a crash. I don't have any other background code running when this happens, although I do usually have one other workbook open.

    If anyone has any speculation on why this might be happening, I'd be grateful!

    EDIT: I'm running Excel 2007.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,884

    Re: Userform object not found after period of inactivity

    In the VB Editor select Tools > options > General > select "Break in Class Module" > Ok
    That should enable you to debug when the error occurs, so you can see what is causing the problem.

  3. #3
    Registered User
    Join Date
    05-14-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2007
    Posts
    31

    Re: Userform object not found after period of inactivity

    Thank you for your reply.
    It already does allow me to debug, but all that does for me is show that the command (ex. "UserForm1.show") is highlighted. Every time I try to step through the code, it gives me the same message, that the object can't be found. I also notice that when I go into VBA to try and open the userform to figure out what's wrong, despite that it shows on the list, I get a similar error (and then sometimes Excel just crashes because screw you).
    (For the record, the form isn't actually called UserForm1, and as I said, the code normally does work just fine, I was just using that as an example).

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

    Re: Userform object not found after period of inactivity

    Upload a copy of your workbook.
    Remove sensitive data.
    It make life simpler, rather than 'crystal ball gazing'.
    torachan.

  5. #5
    Registered User
    Join Date
    05-14-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2007
    Posts
    31

    Re: Userform object not found after period of inactivity

    As you wish, but this is going to take a little explaining.

    I'm a teacher, and I use this workbook as a sort of automatic activity selector, and also to pick random students for things I need. The big "Bouton" in the middle chooses an activity and activates the appropriate userform (most of the data for each userform is located on the worksheet with the corresponding label). Couple of things to note before you dive into the mess:

    1. Lots of my code/modules are probably disorganized and janky as hell, and you might have a hard time finding your way around; I'm just an amateur and I originally made this more than a year ago, and wasn't expecting the need for anyone else to see the code. There are probably lots of things that could be better or optimized but I'd be grateful if you only bring up problems that might be relevant to the issue I'm having. If it's too crappy for you to work with, totally fine, just don't put me on blast for it because this is me giving you advance notice.
    2. It's in a zip file because there are sounds and images that the workbook refers to as an asset library. Shouldn't error unless the folders "Bouton-Assets" and "Sounds" aren't located in the same directory as the LeBouton.xlsm file.
    3. I don't want to go too into detail with the code here in this post, because there's a LOT in there and I want to see if I can find the most relevant bits to work with first. If you need me to help you navigate the workbook, let me know and I'll do what I can.

    Any help is appreciated. Thanks in advance!

    EDIT: Forgot to upload. One moment.

    EDIT 2: It seems it won't let me upload attachments (sigh) so try this link: http://s000.tinyupload.com/?file_id=...57498910444490
    Last edited by bitiumribbon; 09-13-2019 at 10:42 AM.

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

    Re: Userform object not found after period of inactivity

    You could attach your sample workbook.
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    (Don’t use the paper clip icon to attach your file, it doesn’t work.)

  7. #7
    Registered User
    Join Date
    05-14-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2007
    Posts
    31

    Re: Userform object not found after period of inactivity

    Thank you for the tip, didn't even see that.

    I would love to, but I'm sad to say the file (sitting at about 15mb) is too large. If you really need me to, I'll go through and dig out all the sound references to reduce the file size/not need to upload the sound library, but would you mind trying the link I posted first?

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

    Re: Userform object not found after period of inactivity

    I have downloaded your file.
    Still trying to replicate your problem.
    No luck so far, will continue in the hope of failure.
    torachan.

  9. #9
    Registered User
    Join Date
    05-14-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2007
    Posts
    31

    Re: Userform object not found after period of inactivity

    Thank you for your efforts.
    I'm starting to think that this is more of an Excel problem on my computer than a specific workbook problem. I've been noticing that Excel will crash after it has been idle for too long, regardless of whether this workbook is open or not. So I'm thinking that the issue is with Excel itself.
    I've done a repair, and uninstall/reinstall, and I'm not sure what else to try. But I'd like to know what's causing the problem in the first place, because it makes very little sense to me.

  10. #10
    Registered User
    Join Date
    05-14-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2007
    Posts
    31

    Re: Userform object not found after period of inactivity

    So this is just an update because I solved the problem. There must have been something wrong with my installation of Excel 2007, because I got Office 365 and.. no more problems. Sigh.

+ 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. Run vba sub after a period of workbook inactivity
    By hatrickx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-17-2014, 04:25 AM
  2. [SOLVED] Display inactivity timer in text box on userform
    By Klemmdog in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2014, 05:53 PM
  3. [SOLVED] Automatically Save And Close Workbook After Period Of Inactivity
    By swordswinger710 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-07-2014, 09:48 AM
  4. Replies: 12
    Last Post: 06-20-2012, 01:53 PM
  5. Object not found error
    By Viscount_Grey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2011, 12:15 PM
  6. Object syntax with a Period ( . )
    By Neal Zimm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-21-2006, 03:35 PM
  7. Option button object proeprties or object not found in vba
    By Pete Straman S via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-31-2005, 01:05 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