Ver Mensaje Individual
  #15 (permalink)  
Antiguo 21/05/2010, 08:56
Avatar de Monimo
Monimo
 
Fecha de Ingreso: noviembre-2007
Ubicación: Mexico Df
Mensajes: 742
Antigüedad: 16 años, 5 meses
Puntos: 69
Respuesta: ayuda para poner signo de pesos y decimales

Hice tu macro y con esto me corre perfectamente:


Private Sub TextBox2_Change()
Range("B7").Select
cantidad = Val(TextBox1.Text)
PrecioU = Val(TextBox2.Text)
ActiveCell.FormulaR1C1 = TextBox2.Text
Rem aqui pongo la multiplicacion haber que pasa
importe = cantidad * PrecioU
TextBox3.Text = importe
Range ("C7")
importe = FormatCurrency(importe, 2)
ActiveCell.FormulaR1C1 = importe
End Sub


quita todo el método del Private Sub TextBox3_Change() ese borralo



quedaría así:

Private Sub CommandButton1_Click()
Selection.EntireRow.Insert
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox1.SetFocus
End Sub

Private Sub TextBox1_Change()
Range("A7").Select
Val (TextBox1.Text)
ActiveCell.FormulaR1C1 = TextBox1.Text
End Sub

Private Sub TextBox2_Change()
Range("B7").Select
cantidad = Val(TextBox1.Text)
PrecioU = Val(TextBox2.Text)
ActiveCell.FormulaR1C1 = TextBox2.Text
Rem aqui pongo la multiplicacion haber que pasa
importe = cantidad * PrecioU
TextBox3.Text = importe
Range("C7").Select
importe = FormatCurrency(importe, 2)
ActiveCell.FormulaR1C1 = importe
End Sub