PDA

View Full Version : Solved: stop macro deleting an extra row



Pete
11-24-2008, 06:29 AM
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.

Kenneth Hobs
11-24-2008, 06:47 AM
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.
Rows("2:3").Select
Selection.Delete Shift:=xlUp
change to
Rows("2:3").Delete Shift:=xlUp

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.

Pete
11-24-2008, 07:23 AM
i would explain the purpose but the original file is to large to upload and give a clear explaination to your answer.

sorry