Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am pretty sure you don't want the sub to execute when Excel opens and
continue until Excel closes. So under what circumstances should it run? -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "ToddEZ" wrote in message I wrote some code to copy formulas to different cells. I would like the code to run automatically without having to "run the macro". Below is me code. Please help. Sub copyformula() Application.ScreenUpdating = True Worksheets("Sheet1").Activate For Each cell In Range("c1:c1000") If cell.Value = "Y" Then cell.Offset(0, 4).Formula = _ cell.Offset(0, 2) + 20 cell.Offset(0, 5).Formula = _ cell.Offset(0, 2) + 26 cell.Offset(0, 6).Formula = _ cell.Offset(0, 2) + 31 End If Next cell End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SCREEN UPDATE! | Excel Programming | |||
Screen update? | Excel Programming | |||
How to update a control without screen flashing | Excel Programming | |||
Update cell's value without refresh screen? | Excel Programming | |||
Screen Update Dilemma | Excel Programming |