I'll make it simple....seems no one can crack this or it just cant be done I guess.
Here is a code for moving data from Sheet1(Timesheet) to Sheet2(WorkCompCore) same workbook.
I want to do the exact same thing as this code except put it in Sheet2(WorkCompCore) in a COPY of the workbook. This copy is in the same path as the opened workbook. It is the exact same as the workbook open workbook.Only the name is ALL-N-1-Trial.
Sub UpdateLogWorksheet()
Dim historyWks As Worksheet
Dim inputWks As Workbooks
Dim nextRow As Long
Dim oCol As Long
Dim myRng As Range
Dim myCopy As String
Dim myCell As Range
myCopy = "H11,A61,A12,B61,B7,H9,B61,C61,D61,H12,E61,F61,G61,H13,H61,I61,J61,A49,A50,A51,A52,A53,A54,A55,A56,A57,A58,H49,H50,H51,H52,H53,H54,H55,H56,H57,H58"
Set inputWks = Worksheets("Timesheet")
Set historyWks = Worksheets("WorkCompCore")
With historyWks
nextRow = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Row
End With
With inputWks
Set myRng = .Range(myCopy)
End With
With historyWks
oCol = 1
For Each myCell In myRng.Cells
historyWks.Cells(nextRow, oCol).Value = myCell.Value
oCol = oCol + 1
Next myCell
End With
'clear input cells that contain constants
With inputWks
On Error Resume Next
On Error GoTo 0
End With
End Sub
Seems like a simple thing to do but I cant do it. Ill keep trying ntil a Guru cracks it.
Bookmarks