+ Reply to Thread
Results 1 to 3 of 3

VBA Runtime Error 9 - Screen Locked

  1. #1
    Registered User
    Join Date
    06-09-2017
    Location
    Leeds, England
    MS-Off Ver
    Microsoft 365
    Posts
    35

    VBA Runtime Error 9 - Screen Locked

    Hello esteemed folks,

    I have a spreadsheet that I have created a userform for that was working perfectly fine, however recently the users have started to experience a Runtime 9 - Subscript out of range error.

    The code goes to the first line and isn't very helpful when put into debug mode. The line just states:

    Please Login or Register  to view this content.
    The range names haven't changed, there's no object in the ranges and the cells aren't merged or locked. I'm unsure what else to look for.

    After speaking with users it appears this is happening whenever they lock their computer screen for some time, or start working in a different excel document.

    I was wondering if these actions are interrupting the userform code somehow?

    I have changed the reference from the sheet tab name to "Sheet1" but I'm not sure how else to fix the problem.

    My issue also is that I have only ever been able to replicate the error once and everyone is using a copy of the same form that I am using.

    Unfortunately I can't share the actual spreadsheet for GDPR reasons but was wondering if anyone has come across something similar or has any vague ideas on how to fix it?

    Thanks

    Adam

  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: VBA Runtime Error 9 - Screen Locked

    Adam

    When they get the error are there any workbooks open other than the one the userform is in?

    If so, which workbook is active?

    What happens if you replace Sheet1 with ThisWorkbook.Sheet1 or ThisWorkbook.Sheets(tabname)?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-09-2017
    Location
    Leeds, England
    MS-Off Ver
    Microsoft 365
    Posts
    35

    Re: VBA Runtime Error 9 - Screen Locked

    Apologies for the late reply.

    Yes each member if staff will have two maybe three other workbooks open at the same time.

    I will try your suggestion of specifying the workbook and worksheet and see what the results are.

    Thank you for your help.

+ 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. Automatically run a spreadsheet in a locked screen.
    By johncassell in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2019, 04:20 AM
  2. Runtime error 1004 & runtime error 424
    By MrWhiskey in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-29-2017, 08:57 AM
  3. Running Excel 2013 VBA/web query when screen is locked....
    By AndyDD_UK in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-06-2015, 11:45 AM
  4. Runtime error '1004': Paste special method of range class error.
    By Daryl Zer0 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-05-2014, 01:44 AM
  5. [SOLVED] VBA Error: Runtime Error 1004: AutoFilter method of Range class failed
    By jl22stac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2013, 07:27 PM
  6. Locked screen !
    By khalid79m in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-29-2007, 05:50 AM
  7. [SOLVED] Macro fails after screen is locked or screensaver becomes active
    By Denham in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2005, 07:05 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