Hi,
I have created a userform with text fields, and it dumps this data into a table.
Is it possible to convert everything to UpperCase before the data gets transferred over?
Thanks!
I have created a userform with text fields, and it dumps this data into a table.
Is it possible to convert everything to UpperCase before the data gets transferred over?
Code:
Private Sub ENTER_Click()
If TextBox1.Value = "" Or TextBox4.Value = "" Or TextBox5.Value = "" Or TextBox6.Value = "" Or TextBox7.Value = "" Or TextBox8.Value = "" Or TextBox9.Value = "" Or TextBox10.Value = "" Or TextBox11.Value = "" Or TextBox12.Value = "" Or TextBox13.Value = "" Or TextBox14.Value = "" Or TextBox15.Value = "" Or ComboBox1.Value = "" Or ComboBox2.Value = "" Or ComboBox3.Value = "" Then
If MsgBox("Form is not complete. Do you want to continue?", vbQuestion + vbYesNo) <> vbYes Then
Exit Sub
End If
End If
Dim the_Sheet As Worksheet
Dim the_Table As ListObject
Dim Table_Object As ListRow
Set the_Sheet = Sheets("All")
Set the_Table = the_Sheet.ListObjects(1)
Set Table_Object = the_Table.ListRows.Add
Table_Object.Range(1, 1).Value = TextBox1.Value *Switch to UpperCase
Table_Object.Range(1, 2).Value = TextBox4.Value *Switch to UpperCase
Table_Object.Range(1, 3).Value = TextBox5.Value
Table_Object.Range(1, 4).Value = TextBox6.Value
Table_Object.Range(1, 11).Value = TextBox7.Value
Table_Object.Range(1, 16).Value = TextBox8.Value
Table_Object.Range(1, 17).Value = TextBox9.Value
Table_Object.Range(1, 18).Value = TextBox10.Value
Table_Object.Range(1, 19).Value = TextBox11.Value
Table_Object.Range(1, 5).Value = TextBox12.Value
Table_Object.Range(1, 6).Value = TextBox13.Value
Table_Object.Range(1, 7).Value = TextBox14.Value
Table_Object.Range(1, 9).Value = TextBox15.Value
Table_Object.Range(1, 8).Value = ComboBox1.Value
Table_Object.Range(1, 10).Value = ComboBox2.Value
Table_Object.Range(1, 15).Value = ComboBox3.Value
Table_Object.Range(1, 13).Value = "25.00"
Call resetForm
End Sub
Sub resetForm()
TextBox1.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
TextBox10.Value = ""
TextBox11.Value = ""
TextBox12.Value = ""
TextBox13.Value = ""
TextBox14.Value = ""
TextBox15.Value = ""
ComboBox1.Value = ""
ComboBox2.Value = ""
ComboBox3.Value = ""
UserForm1.TextBox1.SetFocus
End Sub
Thanks!