Macro to delete row in 2007 not working same working in 2003
This code is calling only one time when I open my excel sheet. The开发者_C百科 copy of data from one sheet to another sheet working just above the deletion code shown below. if I run the macro again then it is works as expected.
In 2003 both copying and deletion working when I open the sheet.This is the code that is giving me problems:
Rows(ExceptionList & ":" & ExceptionList).Select
Selection.Delete Shift:=xlUp
Is ExceptionList
a String type?
I would avoid this whole string concatenation business and just say Rows(rowNumberToDelete).Delete Shift:=xlUp
Also, the whole .Select
-Selection.
vernacular is unnecessary and inefficient. That's how Excel machine-generates macros, but a thinking human shouldn't write like this.
精彩评论