VBA error Case Without

  • Dear OzGrid, please help, i'm lost in code of bunch of IF's. I have *Case without...* error. Somewhere in middle of code where code must delete rows 1:23 i have declare g,r,u, i'm lost. How to handle multiple IF's? Thanks in advance, sorry for code being too long:(

    Also posted on: http://www.excelforum.com/exce…between-if-and-endif.html

  • Re: HELP i'm lost in between IF and ENDIF

    the macrorecorder is a beautiful thing. just not for this - please clean up your code first.
    Kill all the useless selecting and scrolling.
    Just for example, this:

    Can also be written as this:

    I'll take a look after you've cleaned it up :)

  • Re: HELP i'm lost in between IF and ENDIF

    This line of code is killing me:( It's not deleting empty rows after row23. Behid him is another IF. I don't know how to end this part: If g<24 .....

    And this IF code is part of IF wich must be first, Thanks for your time and help!
    And, how do i shorten this code? I'm VBA novice! My code is only that misery macro record(bunch of Select), rest is from all other great excel forum sites!

    P.s. This down code is working but, again, does not delete empty cells1:23 :-(

  • Re: VBA error Case Without

    I really don't know VBA, i don't know how to shorten this "stupid me" code :-(

    Don't know how to line brake:[ATTACH=CONFIG]70393[/ATTACH]

  • Re: VBA error Case Without

    Quote from StephenR;779105

    Please can you address JasperD's two replies? There isn't much incentive to respond if you do not acknowledge requests or suggestions.

    Yes, sorry! My another thread is: http://www.ozgrid.com/forum/showthread.php?t=201011&page=2
    And, for get the whole picture, dear excel master, need to open my uploaded workbook and run code "(3)CLEAR DATA?"
    I just have limited VBA, English knowlege, sorry dear people!

    I have error of multiple declaration, probably, i'm sure, that Dim g,r,u part!
    Please, how to solve this?
    When i put declaration on top(start of code) then that if g<r....and so on, isn't working [Blocked Image: http://www.excelforum.com/images/smilies/frown.gif]

  • Re: VBA error Case Without

    I solved this, by placing Dim g As Long, r As Long, u As Long on start, rest is history. Thanks to ALL, kind people!

    P.s I still need help to shorten this jumbo code:)