Hello All,
New to this forum as well as VBA, so i would appreciate some insight. This is probably a simple fix, but i am not able to solve the issue. I have received the following error for the code in the module i am building.
I have tried simple fixes ( adding and removing paste, changing the range values), but to no solution. Any help would be appreciated.
New to this forum as well as VBA, so i would appreciate some insight. This is probably a simple fix, but i am not able to solve the issue. I have received the following error for the code in the module i am building.
I have tried simple fixes ( adding and removing paste, changing the range values), but to no solution. Any help would be appreciated.
VBA Code:
Option Explicit
Sub Copy_Paste_Below_Last_Cell()
Dim wbDest As Workbook
Dim wsCopy As Worksheet
Dim wsDest As Worksheet
Dim lDestLastRow As Long
Dim range1 As Range, range2 As Range, range3 As Range, range4 As Range, multipleRange As Range
Application.EnableEvents = False
Set wsCopy = ThisWorkbook.Sheets("Status Board")
Set wbDest = Workbooks.Open("\\LT-MAIN-SRV\public\QUALITY\Status Board\DailyPassdownRecordByShift\DailyLogCompletion.xlsx")
Set wsDest = Worksheets("Log")
Set multipleRange = wsCopy.Range("Area_1,O2,P2,Q2")
lDestLastRow = wsDest.Cells(wsDest.Rows.Count, "A").End(xlUp).Offset(1).Row
multipleRange.Copy _
wsDest.Range(lDestLastRow)
wbDest.Close
Application.EnableEvents = True
End Sub