Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
cpu saving..
hi evrybody !! can anybody make this code more economic for my cpu?? (it is
not a big problem, but maybe there is something better) ty..!! this is part of code of a macro called every 2 seconds.. aWS.Range("H7").Value = aWS.Range("H1").Value aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown aWS.Range("A801").Delete Shift:=xlUp |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
cpu saving..
Why do you copy H7 twice and do nothing with it.
Why do you insert two cells, but only delete one cell what are you trying to do? Maybe With aWS .Range("A1:A799").copy .Range("A2") .Range("A1,H7").Value = .Range("H1").Value End With -- Regards, Tom Ogilvy -- Regards, Tom Ogilvy "N+" wrote: hi evrybody !! can anybody make this code more economic for my cpu?? (it is not a big problem, but maybe there is something better) ty..!! this is part of code of a macro called every 2 seconds.. aWS.Range("H7").Value = aWS.Range("H1").Value aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown aWS.Range("A801").Delete Shift:=xlUp |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
cpu saving..
hi tom ty for help, there is a noticeable save of cpu and also more
manuevrability when switchin from1 window to other, whene there is a lot of winows open. 1) i forgot to write the "delete" twice, u have reason.. 2) i copy twice because the macro runs evry 2 seconds to save the cpu.. so i have to shift down twice (to respect "seconds/rows" proportion..have a link in another page ) .. i can just copy once, having 1 blank cell and 1 filled, its true (with is a little cpu save) 3)sorry for disturbing you again the original code has a "if then" choice , for the base cell..and i can't translate to the new situation..!! help me if u can , ty! If aWS.Range("H1").Value = "0" Then aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown 'aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown Else aWS.Range("H7").Value = aWS.Range("H1").Value aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown 'aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown End If aWS.Range("A801").Delete Shift:=xlUp aWS.Range("A801").Delete Shift:=xlUp "Tom Ogilvy" wrote: Why do you copy H7 twice and do nothing with it. Why do you insert two cells, but only delete one cell what are you trying to do? Maybe With aWS .Range("A1:A799").copy .Range("A2") .Range("A1,H7").Value = .Range("H1").Value End With -- Regards, Tom Ogilvy -- Regards, Tom Ogilvy "N+" wrote: hi evrybody !! can anybody make this code more economic for my cpu?? (it is not a big problem, but maybe there is something better) ty..!! this is part of code of a macro called every 2 seconds.. aWS.Range("H7").Value = aWS.Range("H1").Value aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown aWS.Range("A801").Delete Shift:=xlUp |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
cpu saving..
ty tom i did it placing twice this..
..Range("A1:A799").copy .Range("A2") ty for teaching that useful way for copy paste, i appreciated very much!! hope we will meet again "N+" wrote: hi tom ty for help, there is a noticeable save of cpu and also more manuevrability when switchin from1 window to other, whene there is a lot of winows open. 1) i forgot to write the "delete" twice, u have reason.. 2) i copy twice because the macro runs evry 2 seconds to save the cpu.. so i have to shift down twice (to respect "seconds/rows" proportion..have a link in another page ) .. i can just copy once, having 1 blank cell and 1 filled, its true (with is a little cpu save) 3)sorry for disturbing you again the original code has a "if then" choice , for the base cell..and i can't translate to the new situation..!! help me if u can , ty! If aWS.Range("H1").Value = "0" Then aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown 'aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown Else aWS.Range("H7").Value = aWS.Range("H1").Value aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown 'aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown End If aWS.Range("A801").Delete Shift:=xlUp aWS.Range("A801").Delete Shift:=xlUp "Tom Ogilvy" wrote: Why do you copy H7 twice and do nothing with it. Why do you insert two cells, but only delete one cell what are you trying to do? Maybe With aWS .Range("A1:A799").copy .Range("A2") .Range("A1,H7").Value = .Range("H1").Value End With -- Regards, Tom Ogilvy -- Regards, Tom Ogilvy "N+" wrote: hi evrybody !! can anybody make this code more economic for my cpu?? (it is not a big problem, but maybe there is something better) ty..!! this is part of code of a macro called every 2 seconds.. aWS.Range("H7").Value = aWS.Range("H1").Value aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown aWS.Range("H7").Copy aWS.Range("A1").Insert Shift:=xlDown aWS.Range("A801").Delete Shift:=xlUp |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving as XML | Excel Discussion (Misc queries) | |||
Automaticly saving formula's to values when saving | Excel Discussion (Misc queries) | |||
Saving a spreadsheet without saving the Macro | Excel Programming | |||
Saving a Workbook: Forcing User to Rename before Saving | Excel Programming | |||
Saving Changes | Excel Programming |