Guzzlr
Well-known Member
- Joined
- Apr 20, 2009
- Messages
- 982
- Office Version
- 2021
- Platform
- Windows
Hello All.
I've been trying to clean up the recorder code:
To the new code below... but having issues.
Can someone direct me what I'm doing wrong please.
Thank you
I've been trying to clean up the recorder code:
VBA Code:
Sheets("HV-1").Select
Range("A4:B4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("HV-1 PVT").Select
Range("T3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("HV-1").Select
Range("G4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Application.CutCopyMode = False
Range("A1").Select
Sheets("HV-1 PVT").Select
Range("V3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
To the new code below... but having issues.
Can someone direct me what I'm doing wrong please.
Thank you
Code:
With Sheets("HV-1")
Range("A4:B4").Range(Selection, Selection.End(xlDown)).Select
.Copy
End With
With Sheets("HV-1 PVT")
Range("T3").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End With
With Sheets("HV-1")
Range("G4").Range(Selection, Selection.End(xlDown)).Select
.Copy
Application.CutCopyMode = False
Range("A1").Select
End With
With Sheets("HV-1 PVT")
Range("V3").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End With