Hi Folks,
I am using the folllowing code to copy and paste information from textboxes contained in a userform to a new row on a worksheet.
Before pasting the information a new row is inserted.
I would like to make a small change to this and would appreciate some help.
Instead of inserting a new row i would like it to paste to the next availble row.
For Example:
Can this be done and if so how?
Here is my code i am using so far.
Thanks
I am using the folllowing code to copy and paste information from textboxes contained in a userform to a new row on a worksheet.
Before pasting the information a new row is inserted.
I would like to make a small change to this and would appreciate some help.
Instead of inserting a new row i would like it to paste to the next availble row.
For Example:
- If row 2 already contained information from a job then go to row 3 and paste there.
But If row 3 also contained
Can this be done and if so how?
Here is my code i am using so far.
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
Thanks