The document contains code for multiple programs including a screen protector program, calculator program, identification card validation program, lottery game program, and invoice program. The code defines variables and subroutines to handle events like button clicks and draws graphics.
20. PUBLIC SUB Button4_Click()
TextBox3.Text = TextBox1.Text * TextBox2.Text
END
PUBLIC SUB Button5_Click()
TextBox3.Text = TextBox1.Text / TextBox2.Text
END
Transformar de números a letras
' Attribute VB_Name = "Module1"
' Option Explicit
PUBLIC FUNCTION EnLetras(numero AS String) AS String
DIM b, paso AS Integer
DIM expresion, entero, deci, flag AS String
flag = "N"
FOR paso = 1 TO Len(numero)
IF Mid(numero, paso, 1) = "." THEN
flag = "S"
ELSE
IF flag = "N" THEN
entero = entero & Mid(numero, paso, 1) 'Extae la parte entera del numero
ELSE
deci = deci & Mid(numero, paso, 1) 'Extrae la parte decimal del numero
END IF
END IF
NEXT
' paso
IF Len(deci) = 1 THEN