End With
With Selection.Font
. Name = "Arial Cyr"
. FontStyle = "напівжирний"
. Size = 8
. Strikethrough = False
. Superscript = False
. Subscript = False
. OutlineFont = False
. Shadow = False
. Underline = xlUnderlineStyleNone
. ColorIndex = xlAutomatic
End With
Selection.Borders (xlDiagonalDown). LineStyle = xlNone
Selection.Borders (xlDiagonalUp). LineStyle = xlNone
With Selection.Borders (xlEdgeLeft)
. LineStyle = xlContinuous
. Weight = xlMedium
. ColorIndex = xlAutomatic
End With
With Selection.Borders (xlEdgeTop)
. LineStyle = xlContinuous
. Weight = xlMedium
. ColorIndex = xlAutomatic
End With
With Selection.Borders (xlEdgeBottom)
. LineStyle = xlContinuous
. Weight = xlMedium
. ColorIndex = xlAutomatic
End With
With Selection.Borders (xlEdgeRight)
. LineStyle = xlContinuous
. Weight = xlMedium
. ColorIndex = xlAutomatic
End With
With Selection.Borders (xlInsideVertical)
'. LineStyle = xlContinuous
. Weight = xlThin
'. ColorIndex = xlAutomatic
End With
Cells (i, 1). Value = num
With frmNewZakaz
. txt1.Text = ""
. txt2.Text = ""
. txt3.Text = ""
. DTPicker1.Value = "01.01.1900"
. txt5.Text = ""
. TextBox2.Text = ""
. obm.Value = False
. obj.Value = False
. chb1.Value = False
. chb2.Value = False
. chb3.Value = False
. txt6.Text = ""
. txt7.Text = ""
. txt6.Enabled = False
. txt7.Enabled = False
. TextBox3.Text = ""
. TextBox4.Text = ""
. TextBox5.Text = ""
. TextBox6.Text = ""
. TextBox7.Text = ""
. TextBox8.Text = ""
. TextBox9.Text = ""
. TextBox10.Text = ""
. TextBox11.Text = ""
. ComboBox1.Value = ""
. ComboBox2.Value = ""
. ComboBox3.Value = ""
End With
frmNewZakaz.Show
If ex = 0 Then
Selection.Delete
Exit Sub
End If
Workbooks ("Firms"). Unprotect Password: = "Firms1"
ActiveSheet.Unprotect Password: = "list"
i = 6
Str1 = i
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 And. Cells (Str1...