I have the following simple piece of code:
I currently have this assigned to a button, and when I make certain changes to my spreadsheet, I need to click the button to make the model work.
My question is - how can I avoid the step of having to use the button? Said a different way, how can this code re-run every time the workbook calculates? I would like it to run in the background (so it doesn't navigate back to the sheet this code affects everytime it updates).
Can someone please help me here? Thanks so much!
Code:
Sub Paste_Table_Values()
'
' Paste_Table_Values Macro
'
Range("T28:X32").Select
Range("X28").Activate
Selection.Copy
Range("T38").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
I currently have this assigned to a button, and when I make certain changes to my spreadsheet, I need to click the button to make the model work.
My question is - how can I avoid the step of having to use the button? Said a different way, how can this code re-run every time the workbook calculates? I would like it to run in the background (so it doesn't navigate back to the sheet this code affects everytime it updates).
Can someone please help me here? Thanks so much!