+ Reply to Thread
Results 1 to 7 of 7

Macro Suddenly Not working

  1. #1
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Macro Suddenly Not working

    HTML Code: 
    I have this code and when I try and run it I get Run time error 9 subscript out of range.

    anyone know why?

    you should know that I did have another reduction start sheet that I deleted afer copying one from another workbook.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro Suddenly Not working

    Which line does it highlight? - run it and when it chokes click on debug and hover over the highlighted variables - then you'll at least know what the problem is
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Macro Suddenly Not working

    It highlights just below select case target case "next tap 1" on the set DWS sheet (Reduction Start)

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,569

    Re: Macro Suddenly Not working

    See if "Reduction Start" sheet name has extra space or misspelled.

    Other than that why are you using .End(3)?

    There is no such constants... so it is probably working accidentally...

    constants for xlUp = -4162, so you'd better use one of those.
    I'm afraid some office updates will finally destroy your code...

  5. #5
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Macro Suddenly Not working

    not sure why using anything thing. Got the code from the pay portion of this site.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,569

    Re: Macro Suddenly Not working

    1) Did you check the sheet name?
    subscript out of range in this case means vba can not find the sheet named Reduction Start.

    2) I recommend to replace (3) with either (xlUp) or (-4162).

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,624

    Re: Macro Suddenly Not working

    superchew,
    Pease edit your post #1 and replace the [HTML] [/HTML] with [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags.

    Please don't use HTML tags to post your code samples.
    Ben Van Johnson

+ 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. [SOLVED] macro code suddenly not working
    By RSWillis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2014, 01:15 PM
  2. [SOLVED] Cut/Paste Macro suddenly not working
    By smugglersblues in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2013, 11:54 AM
  3. Macro suddenly stops working
    By Ahoette01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2010, 05:58 PM
  4. Macro suddenly quit working
    By mikellyrice in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2007, 07:38 AM
  5. Help: Excel 4 macro suddenly no longer working
    By Keske Saram in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-03-2005, 10: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