How to delete a range and shift the rest up in Vbasic?

  • Thread starter Thread starter serdar
  • Start date Start date
nope. i creates this code:

Selection.Delete Shift:=xlUp

i want to delete lets say a1 to c3. i can do it with select but i dont want
selection is shown to the user before deleting the area. i must say smt like
"shift the list up starting from the 4th row" I tried:

Range(xxx).Delete Shift:=xlUp

but this doesn't work.
 
Range(x).Delete Shift:=xlUp
or
Rows(x).Delete Shift:=xlUp

These should work but since i dont define the rest of the list, it shifts
the entire document up.
 
Ok i tried it with an if statement.

If Range("a11") = "serdar" Then _
Rows(10).Delete Shift:=xlUp

My fault was trying it just in the event function and it continuosly shifts
the list, true?
 
Thats ok now, don't get angry with me. Because i wrote a delete command in
the change event function without a control statement, change event deletes
and shifts continuosly.
 
Not angry, perplexed... This is the first mention of a change event.
Use application.enableevents=false
 
Back
Top