Cambios en tiempo real en textbox o Label

JIPM

New Member
Joined
Nov 19, 2021
Messages
15
Office Version
  1. 2016
Buenos días a todos los miembros del Foro.
Hoy vengo con una duda y me gustaría que puedieran ayudarme.
Estoy haciendo algunos cálculos en diferentes TextBox, pero quiero que en un TextBox o Label específico se vaya mostrando una medida que yo vaya introduciendo los valores el resultado de esa operación matemática (+, -, /, *)
Qué código uso, en qué Evento ...
Por favor...
Gracias y que tengan excelente día.
Saludos
JIPM
 
Pero no traduzcas la página, porque hace la traducción de CODE a CÓDIGO
[CÓDIGO = vba]

[/CÓDIGO]

Y debe ser así:

1638791860155-png.52759


Y para qué pones todo tu código?
Solamente pon una muestra de ejemplo.
[CÓDIGO = vba]
Sub Promediar()
Dim i As Long, N As Long
Dim ntotal As Double
For i = 1 To 12
With Me.Controls("Mes" & i)
If IsNumeric(.Value) Then
N = N + 1
ntotal = ntotal + CDbl(.Value)
End If
End With
Next
TxtPromedioMes = Format(ntotal / N, "#,##0.00")
End Sub
Sub PromediarDias()
Dim dtotal As Double
dtotal = TxtPromedioMes / 24
TxtPromedioDia = Format(dtotal, "#,##0.00")
End Sub
Sub TotalDiasPagar()
Dim Contar As Long
Dim Carencia As Long
Dim TotalDP As Double
TotalDP = Contar - Carencia

TotalDPagar = TotalDP

End Sub
Private Sub Neto_Change()
Call NetoCobrar
End Sub
Private Sub TotalDContar_Change()
Call Funciones.Calcular_Dias_Lab
End Sub

Private Sub TotalDPagar_Change()
Call TotalDiasPagar
End Sub
Private Sub TxtPromedioDia_Change()
Call PromediarDias
End Sub
Sub DiasPromedioDias()
Dim dpd As Double
Dim totalp As Long
Dim promediod As Long
dpd = TotalDPagar * TxtPromedioDia

TotalPDias = dpd
End Sub
Sub NetoCobrar()
Dim Neto As Double
Dim aplicar As Long
Dim dpd As Long
Neto = (TotalPDias * CmbAplicar) / 100

Neto = Format(Neto, "#,##0.00")
End Sub

'Esto lo creé en un Módulo*************
Option Explicit
Sub Calcular_Dias_Lab()
Dim uf As Long
With Hoja23
uf = .Range("I" & .Rows.Count).End(xlUp).Row + 1
On Error GoTo Salir
.Range("F11") = Application.WorksheetFunction.NetworkDays_Intl(.Range("H8"), .Range("I8"), 11, .Range("I13:I" & uf))
Exit Sub
Salir:
MsgBox "Debe introducir una Fecha válida"
End With
End Sub

[/ CÓDIGO]
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
No. Revisa otra vez. Estás traduciendo la página.
Debes escribir la palabra "CODE"

1638791860155-png.52759


Revisa lo siguiente en tu explorador:

Puedes controlar si deseas ver la opción de Chrome para traducir páginas web.
  1. En la computadora, abre Chrome.
  2. En la esquina superior derecha, haz clic en Más
    Más
    y luego
    Configuración.
  3. En la parte inferior, haz clic en Configuración avanzada.
  4. En "Idiomas", haz clic en Idioma.
  5. Marca o desmarca la opción "Preguntarme si quiero traducir páginas que no estén en un idioma que puedo leer".

Puedes controlar si deseas ver la opción de Chrome para traducir páginas web a un idioma específico.
  1. En la computadora, abre Chrome.
  2. En la esquina superior derecha, haz clic en Más
    Más
    y luego
    Configuración.
  3. En la parte inferior, haz clic en Configuración avanzada.
  4. En "Idiomas", haz clic en Idioma.
  5. Junto al idioma que quieras usar, haz clic en Más
    Más
    .
    • Si el idioma no está en la lista, haz clic en Agregar idiomas.
  6. Activa o desactiva Ofrecer la traducción de páginas en este idioma.
 
Upvote 0

Forum statistics

Threads
1,214,887
Messages
6,122,095
Members
449,064
Latest member
Danger_SF

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top