+ Reply to Thread
Results 1 to 6 of 6

Stuggling with Error 9

  1. #1
    Registered User
    Join Date
    04-05-2018
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Stuggling with Error 9

    Hi -

    I inherited a document that uses a complicated (to me at least) macro to copy and paste a cells from a file of my choosing into a templated file. Now that I've added a few entries to our drop down list form which the macro runs, I'm getting an error 'run-time" subscript out of range. When I run the debugger, it highlights the line below. Thoughts? This is honestly over my simple knowlege of macros and VBA
    Option Explicit

    Please Login or Register  to view this content.
    Last edited by kheman; 04-05-2018 at 11:45 AM.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Stuggling with Error 9

    The workbook does not contain a sheet with name "Sheet1"

    This pair of values
    Please Login or Register  to view this content.
    Last edited by kev_; 04-05-2018 at 11:27 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Registered User
    Join Date
    04-05-2018
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Re: Stuggling with Error 9

    Ughh, well there's problem #1. When I fix that, I receive the run-time error'1004'. Method 'Range of object'_Worksheet' failed

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Stuggling with Error 9

    which line is the code now failing on?

    and....please click on Edit Post and
    .... comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

  5. #5
    Registered User
    Join Date
    04-05-2018
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Re: Stuggling with Error 9

    My apologies. I've edited my previous post to comply with Forum rules.

    Now the error is here:

    Please Login or Register  to view this content.

    cstrProductsCell = 'ProductList'. I've edited this list using the Name Manager to be sure it included the two new additional products. But, I'm still seeing the error.

  6. #6
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Stuggling with Error 9

    This is a (very) long shot but worth a try - if it does not work go back to the original code

    instead of
    Please Login or Register  to view this content.
    try:
    Please Login or Register  to view this content.
    If that does not work
    -what is "RefersTo" formula for Named Range "ProductLIst"?

+ 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. VBA ERROR: run time error 1004: Application-defined or Object-defined error in excel 2013
    By AnanthKrishna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2015, 06:16 AM
  2. [SOLVED] Run-tim error -2147467259(80004005): Automation error Unspecidied error
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2014, 12:12 PM
  3. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  4. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  5. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  6. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  7. [SOLVED] Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 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