Closed Thread
Results 1 to 5 of 5

run time error 9(subscript out of range)

  1. #1
    Registered User
    Join Date
    11-16-2019
    Location
    SAUDI ARABIA
    MS-Off Ver
    Office 365
    Posts
    14

    run time error 9(subscript out of range)

    Hi .
    In the attached file,when the userform automatically triggers
    and w/o putting the values if I opened another Excel file and return to put the values in user form
    ..it's showing run time error 9(subscript out of range.
    How to avoid this?
    Someone pls help???

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: run time error 9(subscript out of range)

    You mention 'when I open another Excel file' could you please be more specific?
    I have not looked at your file yet, but you must make sure that the macro's you run always know 'where they are' if another worksheet is opened and you get an error, then check what the error is probably that it cannot find the worksheet or something like that.
    Troubleshooting is what takes the most time.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: run time error 9(subscript out of range)

    I tested but you better explain what it is you do. It is very bad coding to only let the OK button be active, what's the alternative?

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: run time error 9(subscript out of range)

    Duplicate Post - Question answered in original thread. See https://www.excelforum.com/excel-pro...ml#post5237807

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,882

    Re: run time error 9(subscript out of range)

    Administrative Note:

    Welcome to the forum.

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #5 about thread duplication.

    I am closing this thread, but you may continue here in the original thread: https://www.excelforum.com/excel-pro...y-formula.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Run-time Error '9' - Subscript out of range
    By gboul in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-13-2019, 01:02 PM
  2. Run Time Error 9 : Subscript out of Range
    By vipul.halbe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-03-2018, 03:54 AM
  3. [SOLVED] Run-time error '9': subscript out of range - error occurs on multiple computers except one
    By BrettE in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-06-2014, 11:19 PM
  4. [SOLVED] Run-time error '9': Subscript out of range
    By billj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2013, 11:30 PM
  5. Run-time error 9: Subscript out of Range
    By boesingen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2013, 09:41 AM
  6. [SOLVED] run time error 9, subscript out of range
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-06-2006, 09:31 PM
  7. Run-time error 9 (Subscript out of range)
    By Lizz45ie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2005, 07: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