lse Then
'MsgBox "Виберіть тривалість путівки!", vbOKOnly, "Помилка!"
'Exit Sub
'End If
'If TextBox8.Text = "" Then
'MsgBox "Введіть назву готелю!", vbOKOnly, "Помилка!"
'Exit Sub
'End If
'If OptionButton4.Value = False And OptionButton5.Value = False And _
'OptionButton6.Value = False And OptionButton7.Value = False And _
'OptionButton8.Value = False Then
'MsgBox "Виберіть кількість зірок готелю!", vbOKOnly, "Помилка!"
'Exit Sub
'End If
If IsNumeric (TextBox3.Text) = False And TextBox3.Text <> "" _
Or IsNumeric (TextBox4.Text) = False And TextBox4.Text <> "" _
Or IsNumeric (TextBox5.Text) = False And TextBox5.Text <> "" _
Or IsNumeric (TextBox6.Text) = False And TextBox6.Text <> "" _
Or IsNumeric (TextBox7.Text) = False And TextBox7.Text <> "" Then
MsgBox "Перевірте правильність формату введених даних", vbCritical + vbOKOnly, "Помилка!"
Exit Sub
End If
Me.HideSubSub UserForm_Activate ()
Workbooks ("Firms"). Unprotect Password: = "Firms1"
ActiveSheet.Unprotect Password: = "list" SubSub UserForm_QueryClose (Cancel As Integer, CloseMode As Integer)
If Cancel = 0 Then ex = 0Sub
// Workbook (Firms.xls) Форма frmSelPut
Dim k, m As Integertemp As Integernum As Integerie As Integer
Private Sub ComboBox1_Change ()
k = 0
num = Worksheets (ActiveSheet.Name). Index
ie = Range ("End" & num). Row
ComboBox2.Clear
For ib = Range ("Beg" & num). Row + 1 To ie
If ComboBox1.Value = CStr (Cells (ib, 1). Value) And Cells (ib, 1). MergeCells = True Then
k = Cells (ib, 1). Row
Exit For
End If
Next ib
k = k + 1
temp = k
Do While Cells (k, 1). MergeCells = False And k <> Range ("End" & num). Row
ComboBox2.AddItem Cells (k, 1). Value
k = k + 1
LoopSubSub CommandButton5_Click ()
If ComboBox1.Value = "" And ComboBox2.Value = "" Then
MsgBox "Виберіть країну/місто. Визначтеся вже. ", VbCritical," Помилка! "p> Exit Sub
End If
If ComboBox2.Value = "" And ComboBox1.Value <> "" Then
MsgBox "Виберіть місто.", vbCritical, "Помилка!"
Exit Sub
End If
If ComboBox1.Value = "" And ComboBox2.Value <> "" Then
MsgBox "Виберіть країну.", vbCritical, "Помилка!"
Exit Sub
End If
If ComboBox1.Value <> "" And ComboBox2.Value <> "" Then
flag = 0
For ib = Range ("Beg" & num). Row + 1 To ie
If CStr (Cells (ib, 1). Value) = ComboBox1.Value And Cells (ib, 1). MergeCells = True Then
flag = 1
Exit For
End If
Next ib
If flag = 0 Then
MsgBox "Немає такої країни в списку ...", vbO...