Hi,
I am trying to find an offset date from a table, using a range reference in another sheet. This found offset is to then be copied across into another table when a new working week is needed in the spreadsheet.
I had this working last night after solving the issue but it keeps rearing its ugly head.
here is the code I have...
Sub Roll_JCHR()
Call SetListObjects
'JCHR Project Data Roll and Adjustments...
'Data Within Table...
With JCHRProject.DataBodyRange.Columns(2).Resize(, 5).Copy
JCHRProject.DataBodyRange.Columns(1).PasteSpecial
JCHRProject.DataBodyRange.Columns(6).Clear
'Header Titles for Project Utilisation...
JCHRProject.HeaderRowRange(2).Resize(, 5).Copy
JCHRProject.HeaderRowRange(1).PasteSpecial
End With
'Copy New Date Into "Week 6" of Table...
wsDataInput.Activate
Dim WeekStartDate As Range
Set WeekStartDate = ProjectDates.DataBodyRange.Columns(2).Find(what:=wsResource.Range("C3").Value)
Dim RollDate As Range
Set RollDate = WeekStartDate.Offset(5, 0)
RollDate.Copy
JCHRProject.HeaderRowRange(6).PasteSpecial xlPasteValues
wsResource.Activate
'Adjust Remaining Tables Under Employee...
With JCHRPropose.DataBodyRange.Columns(2).Resize(, 5).Copy
JCHRPropose.DataBodyRange.Columns(1).PasteSpecial
JCHRPropose.DataBodyRange.Columns(6).Clear
JCHRMisc.DataBodyRange.Columns(2).Resize(, 5).Copy
JCHRMisc.DataBodyRange.Columns(1).PasteSpecial
JCHRMisc.DataBodyRange.Columns(6).Clear
JCHRProject.HeaderRowRange.Copy
JCHRPropose.HeaderRowRange(1).PasteSpecial
JCHRMisc.HeaderRowRange(1).PasteSpecial
End With
it throws the error when it is setting the RollDate.
Any help would be great.
Bookmarks