Private Sub CommandButtonSALVAR_Click()
Sheets("DADOS2").Select
'1
Range("F1").Select
Range("F1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = ComboBox2.Value
'2
Range("B1").Select
Range("B1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = ComboBox4.Value
'3
Range("C1").Select
Range("C1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = ComboBox5
'4
Range("D1").Select
Range("D1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = CDbl(TextBox1.Text)
'5
Range("E1").Select
Range("E1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = CDbl(TextBox2.Text)
'6
Range("a1").Select
Range("a1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = CDbl(TextBox3.Text)
'7
Range("G1").Select
Range("G1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = CDbl(ComboBox6.Text)
'8
Range("H1").Select
Range("H1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = CDbl(TextBox4.Text)
Range("I1").Select
Range("I1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = CDbl(TextBox5.Text)
Range("J1").Select
Range("J1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = CDbl(TextBox6.Text)
Range("K1").Select
Range("K1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = CDbl(TextBox7.Text)
Range("L1").Select
Range("L1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = TextBoxCALCULO
TextBoxCALCULO = TextBox4 * TextBox5 * TextBox6 * 7854 / 1000 / 100
TextBoxCALCULO = Format(TextBoxCALCULO, "###0.000")
Range("M1").Select
Range("M1048576").End(xlUp).Offset(1, 0).Select
ActiveCell.Value = TextBoxCALCULO2
TextBoxCALCULO2 = TextBox4 * TextBox5 * TextBox7 * 7854 / 1000 / 100
TextBoxCALCULO2 = Format(TextBoxCALCULO2, "###0.000")
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBoxCALCULO2 = ""
TextBoxCALCULO = ""
TextBox3.SetFocus
End Sub
Postado : 15/12/2017 7:43 am