ioncila
12-29-2009, 06:41 PM
Hi
Sorry for the insistence, but can't solve another issue.
I multiply the values of 2 textboxes and the result would be paste in a sheet cell. This is done well.
...
Sub Totalizar()
txtNEWEXIST.Text = Val(txtEXIST) + Val(txtENTR) - Val(txtSAID)
txtVALTOTAL.Text = txtNEWEXIST.Value * txtPRUNIT.Value
'Format
txtPRUNIT.Value = Format(txtPRUNIT.Value, "#,###.00 €")
txtVALTOTAL.Value = Format(txtVALTOTAL.Value, "#,###.00 €")
End Sub
Private Sub txtENTR_AfterUpdate()
If txtENTR.Value = "" Then
txtENTR.Value = "0"
End If
Totalizar
End Sub
Private Sub txtPRUNIT_AfterUpdate()
If txtPRUNIT.Value = "" Then
txtPRECOUNIT.Value = "0"
End If
Totalizar
End Sub
Private Sub txtSAID_AfterUpdate()
If txtSAID.Value = "" Then
txtSAID.Value = "0"
End If
Totalizar
End Sub
Private Sub txtEXIST_AfterUpdate()
If txtEXIST.Value = "" Then
txtEXIST.Value = "0"
End If
Totalizar
End Sub
Private Sub txtNEWEXIST_AfterUpdate()
If txtNEWEXIST.Value = "" Then
txtNEWEXIST.Value = "0"
End If
Totalizar
End Sub
...
My problem is that the pasted value has a text format and it would be a number format. The sheet column is setup for number format but the values always are shown in text format.
How do I fix that?
Thanks
Sorry for the insistence, but can't solve another issue.
I multiply the values of 2 textboxes and the result would be paste in a sheet cell. This is done well.
...
Sub Totalizar()
txtNEWEXIST.Text = Val(txtEXIST) + Val(txtENTR) - Val(txtSAID)
txtVALTOTAL.Text = txtNEWEXIST.Value * txtPRUNIT.Value
'Format
txtPRUNIT.Value = Format(txtPRUNIT.Value, "#,###.00 €")
txtVALTOTAL.Value = Format(txtVALTOTAL.Value, "#,###.00 €")
End Sub
Private Sub txtENTR_AfterUpdate()
If txtENTR.Value = "" Then
txtENTR.Value = "0"
End If
Totalizar
End Sub
Private Sub txtPRUNIT_AfterUpdate()
If txtPRUNIT.Value = "" Then
txtPRECOUNIT.Value = "0"
End If
Totalizar
End Sub
Private Sub txtSAID_AfterUpdate()
If txtSAID.Value = "" Then
txtSAID.Value = "0"
End If
Totalizar
End Sub
Private Sub txtEXIST_AfterUpdate()
If txtEXIST.Value = "" Then
txtEXIST.Value = "0"
End If
Totalizar
End Sub
Private Sub txtNEWEXIST_AfterUpdate()
If txtNEWEXIST.Value = "" Then
txtNEWEXIST.Value = "0"
End If
Totalizar
End Sub
...
My problem is that the pasted value has a text format and it would be a number format. The sheet column is setup for number format but the values always are shown in text format.
How do I fix that?
Thanks