Aretradeser
Board Regular
- Joined
- Jan 16, 2013
- Messages
- 173
- Office Version
- 2013
- Platform
- Windows
A Userform, used as a form for data entry, consists of several TextBoxes and ComboBoxes for data entry.
By means of these VBA code lines some of them are forced to be filled in:
CODE:
The problem occurs when in the ComboBox1 an element other than "SPAIN" or "PORTUGAL" is selected, which disables the ComboBox6 and the TextBox7; as they cannot be filled in, the data cannot be recorded.
How to solve this obligation to fill in when these controls are disabled (ComboBox6 and TextBox7).
By means of these VBA code lines some of them are forced to be filled in:
CODE:
VBA Code:
If ComboBox1 = Empty Or ComboBox2 = Empty Or ComboBox3 = Empty Or ComboBox4 = Empty Or ComboBox5 = Empty Or _
ComboBox6 = Empty Or TextBox1 = Empty Or TextBox2 = Empty Or TextBox3 = Empty Or TextBox4 = Empty Or _
TextBox5 = Empty Or TextBox6 = Empty Or TextBox7 = Empty Then
MsgBox "MISSING DATA TO BE FILLED IN !!!", vbExclamation: Exit Sub
Else
The problem occurs when in the ComboBox1 an element other than "SPAIN" or "PORTUGAL" is selected, which disables the ComboBox6 and the TextBox7; as they cannot be filled in, the data cannot be recorded.
How to solve this obligation to fill in when these controls are disabled (ComboBox6 and TextBox7).