. I have managed to make a userform for data entry. but the same problem occurs. The data are separated by commas , which are entered as full details in textbox1. Would it be possible to automatically populate the other textboxes using the data in textbox1? or is it possible to use the data in the database to be separated in columns as we enter the infos? sorry for this, im trying really hard to comeup with a better solution. thank you
SAMPLE DATA :
HC12345678,AABABA ANANS ANSNUA,Male,DD/MM/YYYY,MOROCCAN,,*00000000000*
SAMPLE DATA :
HC12345678,AABABA ANANS ANSNUA,Male,DD/MM/YYYY,MOROCCAN,,*00000000000*
VBA Code:
Private Sub ComboBox1_Change()
End Sub
Private Sub CommandButton1_Click()
Set sh = ThisWorkbook.Sheets("Database")
Dim Last_Row As Long
Last_Row = Application.WorksheetFunction.CountA(sh.Range("A:A"))
sh.Range("A" & Last_Row + 1).Value = "=Row()-1"
sh.Range("B" & Last_Row + 1).Value = Me.TextBox1.Value
sh.Range("C" & Last_Row + 1).Value = Me.TextBox2.Value
sh.Range("D" & Last_Row + 1).Value = Me.TextBox3.Value
sh.Range("E" & Last_Row + 1).Value = Me.ComboBox1.Value
sh.Range("F" & Last_Row + 1).Value = Me.TextBox4.Value
sh.Range("G" & Last_Row + 1).Value = Me.TextBox5.Value
sh.Range("H" & Last_Row + 1).Value = Me.TextBox6.Value
sh.Range("J" & Last_Row + 1).Value = Me.ComboBox2.Value
sh.Range("K" & Last_Row + 1).Value = Now
sh.Range("L" & Last_Row + 1).Value = Me.TextBox7.Value
sh.Range("M" & Last_Row + 1).Value = Now
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
Me.ComboBox1.Value = ""
Me.TextBox4.Value = ""
Me.TextBox5.Value = ""
Me.TextBox6.Value = ""
Me.ComboBox2.Value = ""
Me.TextBox7.Value = ""
Call Refresh_Data
End Sub
Private Sub CommandButton2_Click()