e = Cells (temp, 10) 'країна
. ComboBox1.Value = Cells (temp, 11) 'місто
. TextBox8.Text = Cells (temp, 16)
. TextBox9.Text = Cells (temp, 17)
End With
i = 6
Str1 = i
tempoNe = CStr (Cells (temp, 9). Value)
With Workbooks ("Firms.xls"). Worksheets (CStr (Cells (temp, 9). Value))
. Unprotect Password: = "list"
num =. Index
ie =. Range ("End" & num). Row
For ib =. Range ("Beg" & num). Row + 1 To ie
If CStr (. Cells (ib, 1). Value) = Workbooks ("Main.xls"). Worksheets ("Замовлення"). Cells (temp, 10) _
And. Cells (ib, 1). MergeCells = True Then
StrNe1 =. Cells (ib, 1). Row
Exit For
End If
Next ib
For StrNe1 =. Cells (ib, 1). Row + 1 To ie
В
If CStr (. Cells (StrNe1, 1). Value) = Workbooks ("Main.xls"). Worksheets ("Замовлення"). Cells (temp, 11). Value _
And. Cells (StrNe1, 1). MergeCells = False Then
regvzr =. Cells (StrNe1, 2) + Workbooks ("Main.xls"). Worksheets ("Замовлення"). Cells (temp, 16)
regdet =. Cells (StrNe1, 4) + Workbooks ("Main.xls"). Worksheets ("Замовлення"). Cells (temp, 17)
Exit For
End If
'. Protect Password: = "list", DrawingObjects: = True, Contents: = True, Scenarios: = True, _
AllowFormattingCells: = True, AllowFormattingColumns: = True, AllowFormattingRows: = True
Next StrNe1
End With
frmNewZakaz.TextBox3 = Workbooks ("Firms.xls"). Worksheets (CStr (Cells (temp, 9). Value)). Cells (StrNe1, 2)
frmNewZakaz.TextBox4 = Workbooks ("Firms.xls"). Worksheets (CStr (Cells (temp, 9). Value)). Cells (StrNe1, 4)
frmNewZakaz.TextBox5 = Workbooks ("Firms.xls"). Worksheets (CStr (Cells (temp, 9). Value)). Cells (StrNe1, 3)
frmNewZakaz.TextBox6 = Workbooks ("Firms.xls"). Worksheets (CStr (Cells (temp, 9). Value)). Cells (StrNe1, 5)
frmNewZakaz.TextBox7 = Workbooks ("Firms.xls"). Worksheets (CStr (Cells (temp, 9). Value)). Cells (StrNe1, 6)
frmNewZakaz.TextBox10 = Workbooks ("Firms.xls"). Worksheets (CStr (Cells (temp, 9). Value)). Cells (StrNe1, 7)
frmNewZakaz.Show
If ex = 0 Then Exit Sub
With Workbooks ("Firms.xls"). Worksheets (tempoNe)
. Cells (StrNe1, 2) = regvzr
. Cells (StrNe1, 4) = regdet
End With
With Workbooks ("Firms.xls"). Worksheets (frmNewZakaz.ComboBox2.Value)
. Unprotect Password: = "list"
num =. Index
ie =. Range ("End" & num). Row
For ib =. Range ("Beg" & num). Row + 1 To ie
If CStr (. Cells (ib, 1). Value) = frmNewZakaz.ComboBox3.Value _
And. Cells (ib, 1). MergeCells = True Then
Str1 =. Cells (ib, 1). Row
Exit For
End If
Next ib
For Str1 =. Cells (ib, 1). Row To ie
If CStr (. Cells (Str1, 1). Value) = frmNewZakaz.ComboBox1.Value _
...