kimberly090
Board Regular
- Joined
- May 22, 2014
- Messages
- 99
Hi,
I have my submit button code like this:
I wish to add on a confirmation pop out message box to alert user that if the value which is being key in in TextBox8 is exceed 3.0
If user select Yes, then only will store the data inside excel sheet, but if the user select no, another pop out message box will be display to inform user to re-type the value in TextBox8.
I have my submit button code like this:
Code:
Private Sub CommandButton1_Click()Sheets("Overall").Activate
With Me
If Len(.ComboBox1.Value) * Len(.TextBox1.Value) * Len(.ComboBox2.Value) * Len(.ComboBox3.Value) * Len(.TextBox2.Value) * Len(.TextBox3.Value) * Len(.ComboBox4.Value) * Len(.ComboBox5.Value) * Len(.TextBox4.Value) * Len(.TextBox5.Value) * Len(.TextBox6.Value) * Len(.ComboBox6.Value) * Len(.TextBox7.Value) * Len(.TextBox8.Value) = 0 Then
MsgBox "Please Complete All Fields Before Submit"
Else
eRow = Sheet9.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Cells(eRow, 1).Value = ComboBox1.Text
Cells(eRow, 2).Value = TextBox2.Text
Cells(eRow, 3).Value = TextBox3.Text
Cells(eRow, 4).Value = TextBox1.Text
Cells(eRow, 5).Value = ComboBox3.Text
Cells(eRow, 6).Value = TextBox4.Text
Cells(eRow, 7).Value = TextBox5.Text
Cells(eRow, 8).Value = ComboBox4.Text
Cells(eRow, 15).Value = ComboBox6.Text
Cells(eRow, 10).Value = ComboBox5.Text
Cells(eRow, 11).Value = TextBox7.Text
Cells(eRow, 12).Value = TextBox8.Text
Cells(eRow, 13).Value = TextBox6.Text
Cells(eRow, 14).Value = ComboBox2.Text
End If
End With
End Sub
I wish to add on a confirmation pop out message box to alert user that if the value which is being key in in TextBox8 is exceed 3.0
If user select Yes, then only will store the data inside excel sheet, but if the user select no, another pop out message box will be display to inform user to re-type the value in TextBox8.