Cantonalives
Member
Hi,
I am very basic in VB and failing to perform a task I have completed in the past.
How to execute code on a sheet without changing wherever a person is in the book. The below code inelegantly copies cells and pastes formula onwards. Basically this then allows columns to be inserted and then writes the formula in every minute.
So I would like some tips please on how I can execute the code without anyone ever knowing it has run?
Thanks for looking and any advice.
-CL
I am very basic in VB and failing to perform a task I have completed in the past.
How to execute code on a sheet without changing wherever a person is in the book. The below code inelegantly copies cells and pastes formula onwards. Basically this then allows columns to be inserted and then writes the formula in every minute.
So I would like some tips please on how I can execute the code without anyone ever knowing it has run?
Code:
Sub UpdateCells()
Application.OnTime Now + TimeValue("00:01"), "UpdateCells"
Application.ScreenUpdating = False
Sheets("Test").Select
Range("p1:p6").Select
Selection.AutoFill Destination:=Range("p1:zz6"), Type:=xlFillDefault
' Range("p1:zz6").Select
Application.ScreenUpdating = True
End Sub
Thanks for looking and any advice.
-CL
Last edited: