Still rather new with VBA, but this problem as me feeling like I've regressed to day 1. I have a worksheet (Historicals) that I'm clearing contents from so that I can copy another worksheet and 'Paste Special' back on 'Hypotheticals' sheet. I'm trying to accomplish this via a range, A1:M1036, because I have different formulas in Historicals columns N to U, but when macro runs it pastes over N through U with formulas from other sheet. Tried several different modifications, but end up with the same result. I started to wonder if there was some hidden code that I forgot about and needed to check for, but that is not the case.
If someone could point out this obvious simple fix, I would be eternally grateful. And so would the wall that I keep banging my head against
If someone could point out this obvious simple fix, I would be eternally grateful. And so would the wall that I keep banging my head against
Code:
Sub CopyPaste_Historicals()
Dim lLR As Long
Application.ScreenUpdating = False
Sheets("Hypotheticals").Cells.ClearContents
Worksheets("Hypotheticals").Range("A1:M10360").Clear
With Sheets("CAR Open Contract")
lLR = .Range("A1:M" & .Rows.Count).End(xlUp).Row
.UsedRange.Copy
End With
With Sheets("Hypotheticals").Range("A1")
.PasteSpecial _
Paste:=xlPasteAll, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
Last edited: