The Live worksheet contains formulas linked to other workbooks so in an effort to retain a static copy of the calculations at the time of saving I'm copying and pasting the Live sheet values to the Static sheet.
If I run this manually it runs fine.
If I call it from the BeforeSave or embed it into BeforeSave it steps through the lines of code but does nothing.
When BeforeSave initiates the activesheet is always Live.
Sub SaveStatic()
‘just in case their currently false due to other code
Application.EnableEvents = True
Application.ScreenUpdating = True
'clear the Static Sheet
Static.Cells.Clear
'Copy & Paste Live VALUES to Static
Live.Range("A1:R79").Copy
Static.Activate
Static.Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Live.Activate
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Bookmarks