The code below will paste the information from the userforms text box and into a "Database". Information will be populate Ranges A1:N1 on the "Database" Sheet; if pressed again will populate the next empty row. There is a time stamp code on "Database" Sheet, will insert a time stamp on last two cells of the line Ex: Date (M1) and Time (N1). Currently users have to fill the time from N1 into cell C2 and so on. I want to take the Time from (N1) and when users press insert for Ranges A2:N2 (the next empty line) insert the time from cell N1 into C2 and so on. I tried =Now circular but does not work. I was thinking of a code that would The previous time stamp when populated.
Insert Button
Private Sub Completecmd_Click()
Dim sht As Worksheet, outsht As Worksheet, r As Long
Set outsht = Sheets("Database")
With ws
Set sht = Sheet11
r = outsht.UsedRange.Rows.Count
outsht.Cells(r + 1, 1) = sht.Range("B2") 'Operator
outsht.Cells(r + 1, 2) = sht.Range("A4") 'Sales Order
outsht.Cells(r + 1, 3) = sht.Range("B4") 'Start Time
outsht.Cells(r + 1, 4) = sht.Range("C4") 'End Time
outsht.Cells(r + 1, 5) = sht.Range("D4") 'Item
outsht.Cells(r + 1, 6) = sht.Range("E4") 'JobQTY
outsht.Cells(r + 1, 7) = sht.Range("F4") 'Hits
outsht.Cells(r + 1, 8) = sht.Range("G4") 'Additional Hits
outsht.Cells(r + 1, 9) = sht.Range("H4") 'Total Hits
outsht.Cells(r + 1, 10) = sht.Range("I4") '#set ups
outsht.Cells(r + 1, 11) = sht.Range("J4") 'Scraps
outsht.Cells(r + 1, 12) = sht.Range("B6") 'Comments
End With
Me.SOTextBox.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
Me.TextBox4.Value = ""
Me.SOTextBox.Value = SetFocus
End Sub
Thanks in Advance
Bookmarks