Hello,
i have two TAB's and two simple forms with one data entry field.
i use below codes to save the dataentry but on one from i get a debug message.
i don't know what is wrong here, does anyone has a solution.
this is on the first worksheet / form and works fine
Private Sub CommandButton1_Click()
Dim iRow As Long
Dim ws As Worksheet
Worksheets("QC In").Activate
Set ws = ThisWorkbook.Worksheets("QC In")
'find first empty cell in database
iRow = ws.Range("A1").End(xlDown).Row + 1
'copy the data to the Expanditure
ws.Cells(iRow, 1).Value = Me.TextBoxQC_In.Value
'Clear input controls.
Me.TextBoxQC_In.Value = ""
'activate cleaning macro
Call CleanDupes
End Sub
this is on the second worksheet/ form and comes up with the debug on save, on the red line
Private Sub CommandButton3_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("QC Out")
Worksheets("QC Out").Activate
'find first empty cell in database
iRow = ws.Range("A1").End(xlDown).Row + 1
'copy the data to the Expanditure
ws.Cells(iRow, 1).Value = Me.TextBoxQC_Out.Value
'Clear input controls.
Me.TextBoxQC_Out.Value = ""
'activate cleaning macro
Call CleanDupes
End Sub
any help is welcome.
Bookmarks