Daily I copy two worksheets into a new workbook. The worksheets names change daily so I'm trying to reference the sheets by index number and get the value from Cells(1 , 1). But I'm not getting the ranges set properly for the reference/copy from cells and can't figure it out. My initial attempt was to use "With" but I couldn't get that written properly either.
TIA
As always, I appreciate the help.
Ron
TIA
Code:
Sub tm_PastUser()'
Sheet1.Activate
'
Dim tCell As Range
Dim SumCell As Range
'
Dim ThisWb As Workbook
'
Dim ThisWs As Worksheet
Dim OtherWs As Worksheet
'
Set ThisWs = Worksheets(1)
Set OtheWs = Worksheets(2)
Set tCell = ThisWs.Cells(2, 5)
'Set SumCell = ThisWb.OtherWs.Cells(1, 1)
Set SumCell = ThisWb.Range("OtherWs").Range(Cells(1, 1))
'
SumCell.Copy tCell
Application.CutCopyMode = False
End Sub
As always, I appreciate the help.
Ron