redspanna
Well-known Member
- Joined
- Jul 27, 2005
- Messages
- 1,604
- Office Version
- 365
- Platform
- Windows
Hi all
when my userform is activated this code kicks in
when the user inputs all the data into the userform and then selects the add button, all the Textboxes, ComboBoxes etc are copied to a sheet. However the code sticks with an error 'type mismatch on this code
with
being the highlighted error part
can this be fixed to stop the error?
Many thanks in advance
when my userform is activated this code kicks in
Code:
Private Sub UserForm_Activate()
With Worksheets("database")
TextBox2 = Format(.Cells(.Rows.Count, "b").End(xlUp).Value, "ddmmmyy")
End With
End Sub
when the user inputs all the data into the userform and then selects the add button, all the Textboxes, ComboBoxes etc are copied to a sheet. However the code sticks with an error 'type mismatch on this code
Code:
With ws.Cells(iRow, 2)
.NumberFormat = "ddmmmyy"
.Value = CDate(Me.TextBox2.Value)
TextBox2 = Format(.Cells(.Rows.Count, "b").End(xlUp).Value, "ddmmmyy")
with
Code:
.Value = CDate(Me.TextBox2.Value)
can this be fixed to stop the error?
Many thanks in advance