Hi Folks,
I have a worksheet which has a header and some headings in row 1 etc.
I also have in rows 4, 5 and 6 some headings which acuumalate figures.
I then use the following code which is activated by another userform commandbutton which inserts a row into row 2 and then inserts information into the columns. In short, it copies information inserts a new row in row 2 and then pastes the information.
I am then left with my headings my information which was copied across and now my heading which were in rows 4, 5 and 6 have now moved down a row. I hope this explains things clearly.
My problem is that later in the process this sheet needs to be cleared so we can start fresh. However i only need to clear the parts which contain the information that was copied across. Not the headings on the top and bottom. In short the information in the middle.
Can anyone advice me how to do this please.
This is the code i am using to copy and paste the information:
Any help would be appreciated.
Thanks
I have a worksheet which has a header and some headings in row 1 etc.
I also have in rows 4, 5 and 6 some headings which acuumalate figures.
I then use the following code which is activated by another userform commandbutton which inserts a row into row 2 and then inserts information into the columns. In short, it copies information inserts a new row in row 2 and then pastes the information.
I am then left with my headings my information which was copied across and now my heading which were in rows 4, 5 and 6 have now moved down a row. I hope this explains things clearly.
My problem is that later in the process this sheet needs to be cleared so we can start fresh. However i only need to clear the parts which contain the information that was copied across. Not the headings on the top and bottom. In short the information in the middle.
Can anyone advice me how to do this please.
This is the code i am using to copy and paste the information:
Code:
'This section transfers the new information entered to Shift Managers Daily Shift Report
Dim DSR As Worksheet
Set DSR = Workbooks("Shift Manager.xls").Worksheets("Daily Shift Report")
DSR.Rows("2:2").Insert Shift:=Down 'Insert Row
DSR.Range("A2") = Me.DateTextBox
DSR.Range("B2") = Me.ShiftTextBox
DSR.Range("D2") = Me.OrderNoTextBox
DSR.Range("E2") = Me.CatalogueTextBox
DSR.Range("F2") = Me.ConfigurationComboBox
DSR.Range("G2") = Me.CasHrsTextBox
DSR.Range("H2") = Me.TempHrsTextBox
DSR.Range("I2") = Me.PermHrsTextBox
DSR.Range("J2") = Me.TotalHrsTextBox
DSR.Range("K2") = Me.TotalDiscsTextBox
DSR.Range("C2") = Workbooks("Team Leader.xls").Worksheets("Team Leader Screen").Range("F6") 'Shift Pattern
Any help would be appreciated.
Thanks