gorod = Cells (temp, 1)
i = temp
Do While Cells (i, 1). MergeCells = False
i = i - 1
Loop
frmPInfo.Label1.Caption = ActiveSheet.Name
frmPInfo.TextBox1.Text = Cells (i, 1). Value
frmPInfo.TextBox2.Text = gorod
frmPInfo.TextBox3.Text = Cells (temp, 2). Value
frmPInfo.TextBox5.Text = Cells (temp, 3). Value
frmPInfo.TextBox4.Text = Cells (temp, 4). Value
frmPInfo.TextBox6.Text = Cells (temp, 5). Value
frmPInfo.TextBox7.Text = Cells (temp, 6). Value
frmPInfo.TextBox8.Text = Cells (temp, 8). Value
frmPInfo.TextBox9.Text = Cells (temp, 10). Value
If Cells (temp, 7). Value = 7 Then frmPInfo.OptionButton1 = True
If Cells (temp, 7). Value = 14 Then frmPInfo.OptionButton2 = True
If Cells (temp, 7). Value = 21 Then frmPInfo.OptionButton3 = True
If Cells (temp, 9). Value = 1 Then frmPInfo.OptionButton4 = True
If Cells (temp, 9). Value = 2 Then frmPInfo.OptionButton6 = True
If Cells (temp, 9). Value = 3 Then frmPInfo.OptionButton7 = True
If Cells (temp, 9). Value = 4 Then frmPInfo.OptionButton8 = True
If Cells (temp, 9). Value = 5 Then frmPInfo.OptionButton5 = True
frmPInfo.Show
If ex = 0 Then Exit Sub
With frmPInfo
If. TextBox5.Value = "" Then. TextBox5.Value = 0
If. TextBox6.Value = "" Then. TextBox6.Value = 0
If. TextBox7.Value = "" Then. TextBox7.Value = 0
If. TextBox3.Value = "" Then. TextBox3.Value = 0
If. TextBox4.Value = "" Then. TextBox4.Value = 0
Cells (temp, 3). Value = CDbl (. TextBox5.Value)
Cells (temp, 5). Value = CDbl (. TextBox6.Text)
Cells (temp, 6). Value = CDbl (. TextBox7.Text)
Cells (temp, 2). Value = CInt (. TextBox3.Text)
Cells (temp, 4). Value = CInt (. TextBox4.Text)
Cells (temp, 8). Value = CStr (. TextBox8.Text)
Cells (temp, 10). Value = CStr (. TextBox9.Text)
If. OptionButton1 = True Then
Cells (temp, 7). Value = CInt (7)
End If
If. OptionButton2 = True Then
Cells (temp, 7). Value = CInt (14)
End If
If. OptionButton3 = True Then
Cells (temp, 7). Value = CInt (21)
End If
If. OptionButton4 = True Then
Cells (temp, 9). Value = CInt (1)
End If
If. OptionButton5 = True Then
Cells (temp, 9). Value = CInt (5)
End If
If. OptionButton6 = True Then
Cells (temp, 9). Value = CInt (2)
End If
If. OptionButton7 = True Then
Cells (temp, 9). Value = CInt (3)
End If
If. OptionButton8 = True Then
Cells (temp, 9). Value = CInt (4)
End If
End With
frmPInfo.Label1.Caption = ""
frmPInfo.TextBox1.Text = ""
frmPInfo.TextBox2.Text = ""
frmPInfo.TextBox3.Text = ""