Hi all once again,

Currently working on a code to be attached to a command button on a userform, I have the code to copy all fields to a specific sheet "AuditLog", however I also need the code to copy the same data to a second sheet based on the value in ComboBox1 eg. if ComboBox1 value is "CM1" then also copy data to sheet "CM1" in exactly the same way as originally done in "AuditLog" in next available row? Thanks to all again in advance & have a great day

Code so far...

Private Sub CommandButton1_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("AuditLog")

Application.ScreenUpdating = False

'find  first empty row in database
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row

'check for a Input
If Trim(Me.TextBox1.Value) = "" Then
Me.TextBox1.SetFocus
MsgBox "Please enter all fields"
Exit Sub
End If
Sheets("AuditLog").Unprotect Password:="000"

'copy the data to the database

ws.Cells(iRow, "A").Value = Me.TextBox1.Value
ws.Cells(iRow, "B").Value = Me.TextBox2.Value
ws.Cells(iRow, "C").Value = Me.ComboBox1.Value
ws.Cells(iRow, "D").Value = Me.TextBox3.Value
ws.Cells(iRow, "E").Value = Me.TextBox4.Value
ws.Cells(iRow, "F").Value = Me.TextBox5.Value
ws.Cells(iRow, "G").Value = Me.ComboBox2.Value
ws.Cells(iRow, "H").Value = Me.ComboBox3.Value

'clear the data
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.ComboBox1.Value = ""
Me.TextBox3.Value = ""
Me.TextBox4.Value = ""
Me.TextBox5.Value = ""
Me.ComboBox2.Value = ""
Me.ComboBox3.Value = ""
Me.TextBox1.SetFocus
   
End Sub