+ Reply to Thread
Results 1 to 6 of 6

Help debugging macro

  1. #1
    Registered User
    Join Date
    04-15-2014
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2010
    Posts
    15

    Help debugging macro

    Hi,

    I'm not very good at macros and I juggled some rows around in my spreadsheet which seems to have stopped the macro I had from working. Can someone help me bedug, I don't understand what's wrong with it?

    DEBUG HELP.JPG
    Attached Files Attached Files
    Last edited by kellynicolebarrett; 07-16-2014 at 09:35 AM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help debugging macro

    If the code could not find visible cells, it errors, one way, but not the best way to cheat

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-15-2014
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Help debugging macro

    where in the code should i put this?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,424

    Re: Help debugging macro

    Please Login or Register  to view this content.

    You don't have data after column 24 on row 5. In the cells up to that point, you have numbers (week start/end/whatever). After that, you just have buttons. I suspect that has something to do with it.

    As AB33 has said, if there are no visible cells in the range, that's why you get the error. But I would suggest that you don't just want to ignore the error, you need to condition the rest of the code following on myRange not being Nothing.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    04-15-2014
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Help debugging macro

    ah that was indeed the problem. I typed the numbers on the buttons into the cells beneath them and the macro now works. Many thanks, stars for your help!

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,424

    Re: Help debugging macro

    You're welcome. Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] Debugging a macro
    By jharaldson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2013, 01:52 PM
  2. [SOLVED] Macro debugging
    By VelvetRevolver84 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-01-2013, 06:14 PM
  3. Need help debugging simple macro
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-17-2006, 09:55 PM
  4. Help please in debugging this macro
    By sungen99 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-23-2006, 11:45 AM
  5. Debugging macro
    By annep in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-20-2006, 06:18 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