Chart Final Row Reference

  • Ah, 'tis a long afternoon, and my old brain can't think so well.


    Here is my code:



    This is part of a larger chart macro, but I can't get beyond the Final Row portion. Everything works up to this point, but when it reaches the last line "FinalRow", then it immediately exits the sub. Error message:


    Method 'Cells' of Object'_Global' Failed


    Any idea what's causing? Or what to correct?


    My goal is the user will select the start cell and then it will determine how many items are in the list, and that becomes the basis for adjusting chart colors. everything else works, but this line.


    Software: OpenOffice 3.0/NeoOffice 3.0 on Mac OS X 10.5.6
    Humanware: Older than dirt


    Old, slow, and confused - but at least I'm inconsistent!


    Rich
    (retired Excel 2003 user, 3.28.2008)

  • Re: Chart Final Row Reference


    Sometimes, it helps just to write out the problem and start over (at least for us old codgers ;) ).


    Here is what I used for FinalRow


    Code
    FinalRow = StartCell.End(xlDown).Row


    Software: OpenOffice 3.0/NeoOffice 3.0 on Mac OS X 10.5.6
    Humanware: Older than dirt


    Old, slow, and confused - but at least I'm inconsistent!


    Rich
    (retired Excel 2003 user, 3.28.2008)

  • Re: Chart Final Row Reference


    I did it slightly different. I amde it so it would highlight the cells after the start cell. This may be different than what you want, but works well if others have similar.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!