InicioApuntes Y Monografiascomo hacer una calculadora que habla en excel con vb

como hacer una calculadora que habla en excel con vb



Hola amigos taringueros recientemente he echo una calculadora que habla en visual basic

AQUI SE LA MUESTRO (PARA SI QUIEREN LA PRUEBEN)



PASOS:

1) Abran excel
2) EN LA BOLA DE INICIO:
Vayan a opciones de excel.
3)Haga clic en centro de confianza >configuración avanzada.
4)Haga clic para activar la casilla de habilitar macros(la ultima) y confiar al modelo de objetos de vba.



5) Delen a a Aplicar y seguidamente cierren el excel " Guardandolo con Macros Habilitados"
con el nombre que quieran.

-----------------------------------------------------------------------------------------------------------------------------------------------

7) En e l escritorio veran que en el Excel sale un triangulo (ya estan habilitadas las Macros)..Abranlo
y veran un nuevo modulo que se llama "PROGRAMADOR"

8)Vayan a esa pestaña y delen al icono de Vis basic

9) Dar a insertar "NUEVO MODULO" Para poder escribir en el.

10) INSERTAR ESTE CODIGO:

'
' calculadora Macro
'

'option explicit


Sub calculadora()

Dim signo As String
Dim valor1 As Integer, valor2 As Integer, total As Integer
Dim FECHA As Date
Dim TEXTO As String


Range("A1".Value = Now
Range("b4".Value = InputBox("Introduce tu primer numero"
Range("b6".Value = InputBox("Introduce tu segundo numero"


valor1 = Val(Range("b4".Value)
valor2 = Val(Range("b6".Value)
signo = InputBox("Que quieres hacer"
Range("B5".Value = signo
total = 0


If signo = "+" Then
total = valor1 + valor2
Range("b7".Value = total


End If

If signo = "-" Then
total = valor1 - valor2
Range("b7".Value = total

End If

If signo = "x" Then
total = valor1 * valor2
Range("b7".Value = total

End If

If signo = ":" Then
total = valor1 / valor2
Range("b7".Value = total

End If
Call HABLA


End Sub

Sub HABLA()
Dim TEXTO As String

TEXTO = ActiveSheet.Range("b4".Value
CreateObject("SAPI.SPVOICE".Speak TEXTO

TEXTO = ActiveSheet.Range("b6".Value
CreateObject("SAPI.SPVOICE".Speak TEXTO

TEXTO = ActiveSheet.Range("b7".Value
CreateObject("SAPI.SPVOICE".Speak TEXTO

End Sub


Sub COLORESRGB()

Range("B4".Font.Color = RGB(210, 105, 30)
Range("B4".Font.Bold = True
Range("B4".Font.Size = 24

Range("B5".Font.Color = RGB(255, 105, 30)
Range("B5".Font.Bold = True
Range("B5".Font.Size = 24

Range("B6".Font.Color = RGB(50, 205, 50)
Range("B6".Font.Bold = True
Range("B6".Font.Size = 24

Range("B7".Font.Color = RGB(255, 0, 0)
Range("B7".Font.Bold = True
Range("B7".Font.Size = 24


End Sub

Sub LIMPIAR()

Dim TEXTO As String

Range("B4:B7".Value = Clear

End Sub

11) Dar a guardar pero si salir del macro y luego a depurar (Boton con el Simbolo Reproducir).

Compruebenlo en excel

ESTE POST ES TOTALMENTE MÍO Y CON INTENCIÓN DE AYUDAR
ADMITO COMENTARIOS PARA AYUDARLES SIEMPRE QUE SEAN CON ESE FIN
TAMBIÉN ADMITO SUGERENCIAS PARA MODIFICARLO O APRENDER MÁS

Gracias....

Nota: NO SE PORQUE AL PEGAR EL CODIGO ME SALEN UNAS CARAS
SON EL CIERRE DE LOS PARENTESIS ( ) SUSTITUYANLOS

Y UN PUNTO AL FINAL.....ASÍ ).
Datos archivados del Taringa! original
10puntos
339visitas
0comentarios
Actividad nueva en Posteamelo
0puntos
3visitas
0comentarios
Dar puntos:

Dejá tu comentario

0/2000

Autor del Post

g
guinot137🇦🇷
Usuario
Puntos0
Posts46
Ver perfil →
PosteameloArchivo Histórico de Taringa! (2004-2017). Preservando la inteligencia colectiva de la internet hispanohablante.

CONTACTO

18 de Septiembre 455, Casilla 52

Chillán, Región de Ñuble, Chile

Solo correo postal

© 2026 Posteamelo.com. No afiliado con Taringa! ni sus sucesores.

Contenido preservado con fines históricos y culturales.