Consulting

Results 1 to 3 of 3

Thread: Solved: stop macro deleting an extra row

  1. #1
    VBAX Tutor
    Joined
    Aug 2007
    Posts
    294
    Location

    Solved: stop macro deleting an extra row

    see attached workbook.
    Hi Experts

    How would i edit the macro in module 1 - so that when the user click the macro button over and over again it does not delete the yellow header...

    Click the macro button and see what happens i am trying to stop this happening....

    The current macro in module when just shows the steps need to get the header to there current state from the raw data, so i need the original functionality.

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    I don't see the purpose in the macro. Please explain in words what it should do.

    There is not need to select and use selection.
    e.g.
    [VBA]Rows("2:3").Select
    Selection.Delete Shift:=xlUp[/VBA]
    change to
    [VBA]Rows("2:3").Delete Shift:=xlUp[/VBA]

    Of course this is deleting the yellow row(2) and the blank row 3.

    I would also suggest that you only format the cells that you are using. I don't see a need to set the interiorcolor for blank columns.

  3. #3
    VBAX Tutor
    Joined
    Aug 2007
    Posts
    294
    Location
    i would explain the purpose but the original file is to large to upload and give a clear explaination to your answer.

    sorry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •