F
Frank
Here is a problem I can’t seem to resolve.
I have an execution button on a sheet (sheet01) to clear my workbook.
On sheet03, I have rows to be deleted. On one row, there are “up-down”
sort buttons which needs to move up.
Here is the code
Sub button_delete_all()
If Range("pv_copy1").Offset(1, 0) <> "" Then
Range("reporting1").EntireRow.Delete
If Range("pv_copy2").Offset(1, 0) <> "" Then
Range("reporting2").EntireRow.Delete
End Sub
Pretty straight forward, right?
When I open my workbook and directly run the macro, the “up-down” sort
buttons on sheet03 do not move with the deleted rows. But (here is the
kicker), if I select sheet03 and go back to run the macro, the “up-
down” sort buttons move as expected.
I am puzzled and wanted to run it by experts (I am not a programmer by
trade).
I’ve uploaded my test spreadsheet at http://home.comcast.net/~gegene/test..xlsm
I am using Excel 2010 and Windows 7.
I have an execution button on a sheet (sheet01) to clear my workbook.
On sheet03, I have rows to be deleted. On one row, there are “up-down”
sort buttons which needs to move up.
Here is the code
Sub button_delete_all()
If Range("pv_copy1").Offset(1, 0) <> "" Then
Range("reporting1").EntireRow.Delete
If Range("pv_copy2").Offset(1, 0) <> "" Then
Range("reporting2").EntireRow.Delete
End Sub
Pretty straight forward, right?
When I open my workbook and directly run the macro, the “up-down” sort
buttons on sheet03 do not move with the deleted rows. But (here is the
kicker), if I select sheet03 and go back to run the macro, the “up-
down” sort buttons move as expected.
I am puzzled and wanted to run it by experts (I am not a programmer by
trade).
I’ve uploaded my test spreadsheet at http://home.comcast.net/~gegene/test..xlsm
I am using Excel 2010 and Windows 7.