+ Reply to Thread
Results 1 to 5 of 5

Runtime Error - Subscript out of Range / Object Error

  1. #1
    Registered User
    Join Date
    05-04-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Runtime Error - Subscript out of Range / Object Error

    Hello, I am trying to set up a UserForm but consistently receive a runtime error or object error. Below is my code:

    HTML Code: 
    I also have a button on the sheet where I want the data to be sent to. The code for it is:

    HTML Code: 
    Also, I am very new to coding (<week).

    Any help is greatly appreciated.

  2. #2
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Runtime Error - Subscript out of Range / Object Error

    Where (which line) does the error occur?

  3. #3
    Registered User
    Join Date
    05-04-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Runtime Error - Subscript out of Range / Object Error

    I spelled Language incorrectly...WOW. Thanks for the response.

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Runtime Error - Subscript out of Range / Object Error

    To prevent this from happening in the future, place Option Explicit at the very top of you code. You would be surprised how often it is a life-saver because it forces you to correct spelling mistakes and declare all the variables correctly.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  5. #5
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Runtime Error - Subscript out of Range / Object Error

    And to have:
    Please Login or Register  to view this content.
    automatically added to every new module, in the VBE (Visual Basic Editor), go to Tools -> Options and click the "Editor" tab and check the box next to "Require Variable Declarations" (if not checked). Every new module with have "Option Explicit" at the top of the module.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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