Ver Mensaje Individual
  #16 (permalink)  
Antiguo 21/05/2010, 10:39
nauta85
 
Fecha de Ingreso: mayo-2010
Mensajes: 18
Antigüedad: 13 años, 11 meses
Puntos: 0
Respuesta: ayuda para poner signo de pesos y decimales

Cita:
Iniciado por Monimo Ver Mensaje
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

HOLA MUCHAS GRACIAS SI ES CIERTO SI CORRE BIEN GRACIAS POR TU AYUDA, UNA COSA MAS, YO HICE ESTO ASI COMO CUANDO UNO SE TAPA LOS OJOS Y CAMINA COMO SE DICE ATIENTAS, Y CON TU AYUDA Y LA DEL OFFICE, PERO ME GUSTARIA SABER MAS DE LA PROGRAMACION CONOCER MAS A FONDO LO COMANDOS Y ENTENDERLOS SOBRE TODO, QUERIA LO MEJOR, ME PUEDES RECOMENDAR ALGUN LIBRO DONDE SE EXPLIQUE SENCILLO, POR QUE LOS QUE HE VISTO DAN MUCHAS VUELTAS Y NO HACEN ANDA CONCRETO, GRACIAS POR TODO, Y POR AQUI ESTARE MOLESTANDO JEJEJE QUIERO HACER MAS COSAS.

VOY AEMPEZAR HACER UNA BASE DE DATOS PARA DESPUES LLAMAR CADA CONCEPTOY PODER HACER UNA FICHA UNITARIA Y HACER UN PRESUPUESTO ESPERO PODER.

NOS VEMOS


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