Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range.Delete and Range.Resize.Name performance issues
I have some code that
a) Deletes cells in a range (Shift:=xlLeft) b) Inserts cells (Shift:=xlToRight) c) and then, resizes the ranges and assigns the same name. Example: Set Global_Board = Range("Select.Method.Results") a) Global_Board.Offset(-3, 1).Resize(NbLayerMax + 4, Global_Board.Columns.Count - 1).Delete Shift:=xlToLeft b & c) With Global_Board .Offset(-3, 1).Resize(NbLayerMax + 4, NBMethod_Selected - 1).Insert Shift:=xlToRight .Resize(, NBMethod_Selected).name = "Select.Method.Results" End With There are 3 such ranges that these operations are being performed upon. I've noticed that there's a signicant cumulative delay in performing these steps when the code is run repeatedly. Over 20 iterations, it can grow to several seconds. The size of the ranges is typically 10rx1c. Is there a workaround? How else can I change this (inherited) code? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Delete blanks between a range and populate only the names inthe given range | Excel Discussion (Misc queries) | |||
New Range resize Question | Excel Programming | |||
Range resize | Excel Programming | |||
Range Resize | Excel Programming | |||
Resize Range Problem | Excel Programming |