ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
Hi,
Below is what i use to transfer some value from a userform to a worksheet.
Please advise how i can edit the code so that the following MUST have a value entered before transfer happens.
COMBOBOX 1,3 & 11
TEXTBOX 6
Thanks
Below is what i use to transfer some value from a userform to a worksheet.
Please advise how i can edit the code so that the following MUST have a value entered before transfer happens.
COMBOBOX 1,3 & 11
TEXTBOX 6
Thanks
Rich (BB code):
Private Sub CommandButton1_Click()
ThisWorkbook.Worksheets("DATABASE").Range("B6") = Me.ComboBox1.Text ' REGISTRATION NUMBER
ThisWorkbook.Worksheets("DATABASE").Range("C6") = Me.ComboBox2.Text ' BLANK USED
ThisWorkbook.Worksheets("DATABASE").Range("D6") = Me.ComboBox3.Text ' VEHICLE
ThisWorkbook.Worksheets("DATABASE").Range("E6") = Me.ComboBox4.Text ' BUTTONS
ThisWorkbook.Worksheets("DATABASE").Range("F6") = Me.ComboBox5.Text ' ITEM SUPPLIED
ThisWorkbook.Worksheets("DATABASE").Range("G6") = Me.ComboBox6.Text ' TRANSPONDER CHIP
ThisWorkbook.Worksheets("DATABASE").Range("H6") = Me.ComboBox7.Text ' JOB ACTION
ThisWorkbook.Worksheets("DATABASE").Range("I6") = Me.ComboBox8.Text ' PROGRAMMER USED
ThisWorkbook.Worksheets("DATABASE").Range("J6") = Me.ComboBox9.Text ' KEY CODE
ThisWorkbook.Worksheets("DATABASE").Range("K6") = Me.ComboBox10.Text ' BITING
ThisWorkbook.Worksheets("DATABASE").Range("L6") = Me.ComboBox11.Text ' CHASIS NUMBER
ThisWorkbook.Worksheets("DATABASE").Range("N6") = Me.ComboBox12.Text ' VEHICLE YEAR
ThisWorkbook.Worksheets("DATABASE").Range("R6") = Me.TextBox1.Text ' ADDRESS 1st LINE
ThisWorkbook.Worksheets("DATABASE").Range("S6") = Me.TextBox2.Text ' ADDRESS 2nd LINE
ThisWorkbook.Worksheets("DATABASE").Range("T6") = Me.TextBox3.Text ' ADDRESS 3rd LINE
ThisWorkbook.Worksheets("DATABASE").Range("U6") = Me.TextBox4.Text ' ADDRESS 4TH LINE
ThisWorkbook.Worksheets("DATABASE").Range("V6") = Me.TextBox5.Text ' POST CODE
ThisWorkbook.Worksheets("DATABASE").Range("W6") = Me.TextBox6.Text ' CONTACT NUMBER
Unload DatabaseToSheet
End Sub