h Workbooks ("Firms.xls"). Worksheets (Sheet.Name)
For ib =. Range ("Beg" & num). Row + 1 To ie
If ComboBox2.Value = CStr (. Cells (ib, 1). Value) And. Cells (ib, 1). MergeCells = True Then
k =. Cells (ib, 1). Row
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 1). Value = Sheet.Name
Stri = CStr (Sheet.Name)
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Hyperlinks.Add _
Anchor: = Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 1), _
Address: = "C: Users Marinkoff Desktop Firms.xls", SubAddress: = _
"'" & Stri & "'! A1", TextToDisplay: = CStr (Sheet.Name)
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 2). Value = CStr (ComboBox2.Value)
Оформити i, maxi
i = i + 1
End If
Next ib
End With
End If
End If
Next Sheet
Me.Hide
End If
'якщо обрана фірма і країна
If ComboBox1.Value <> "" And ComboBox2.Value <> "" _
And ComboBox3.Value = "" And TextBox2.Text = "" _
And TextBox3.Text = "" And TextBox4.Text = "" _
And TextBox5.Text = "" Then
num = Workbooks ("Firms.xls"). Worksheets (ComboBox1.Value). Index
ie = Workbooks ("Firms.xls"). Worksheets (ComboBox1.Value). Range ("End" & num). Row
If ie <> 6 Then
With Workbooks ("Firms.xls"). Worksheets (ComboBox1.Value)
For ib =. Range ("Beg" & num). Row + 1 To ie
If ComboBox2.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
For ib = k To ie
If. Cells (ib, 1). MergeCells = False And ib <> ie Then
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 1). Value = ComboBox1.Value
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 2). Value = ComboBox2.Value
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 3). Value =. Cells (ib, 1). Value
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 4). Value =. Cells (ib, 2). Value
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 5). Value =. Cells (ib, 3). Value
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 6). Value =. Cells (ib, 4). Value
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 7). Value =. Cells (ib, 5). Value
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 8). Value =. Cells (ib, 6). Value
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 9). Value =. Cells (ib, 7). Value
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 10). Value =. Cells (ib, 8). Value
Workbooks ("Main.xls"). Worksheets ("ПоіскПутевкі"). Cells (i, 11). Value =. Cells (ib, 9...