02 Clase Vba
-
Upload
ebert-paico-amaya -
Category
Documents
-
view
218 -
download
0
description
Transcript of 02 Clase Vba
Range("A1").select
Range("A1:A10").select Seleccionar celdasRange("A1;A10").select
Ingresar Datos
ActiveCell.FormulaR1C1="texto" ActiveCell.FormulaR1C1 = "=RC[-3]+R[2]C"
ActiveCell.FormulaR1C1=20
Selection.ClearContents Eliminar contenido de la selección actual
MsgBox("Mensajes emergentes")
InputBox("Ingreso de valores a traves de Ventanas emergentes")
Cells(Nºcolumna, Nºfila)
Seleccionar celdas
Ingresar Datos
ActiveCell.FormulaR1C1 = "=RC[-3]+R[2]C"
Eliminar contenido de la selección actual
InputBox("Ingreso de valores a traves de Ventanas emergentes")
AD-CONSULTORES S.A.
Codigo 5
Nombre Completo CHAHUARA CONDORI, JUAN
Cargo Operario AFP LA UNION
Sueldo 1000 Retención
Bonificación ESSALUD
NETO
NETO (sueldo+bonificacion)-(retencion+essalud)
AD-CONSULTORES S.A.
Donde
Retencion 12%Bonificación 10%
ESSALUD 5%
(sueldo+bonificacion)-(retencion+essalud)
Cree macro (lim_val)que al seleccionar codigo borre los datos de: Retencion, bonificacion,ESSALUD y NETO. Asigne macro al Cuadro Combinado
NRO CODIGO APELLIDO Y NOMBRE OCUPACION
1 AB001 RAMOS ROJAS, JORGE Gerente2 AB002 MONTERREY ROQUE, EDGAR Administrador3 AB003 ZALDIVAR ALVAREZ, MARIO Operario4 AB004 VARGAS CASTRO, MARCO Operario5 AB005 CHAHUARA CONDORI, JUAN Operario6 AB006 RODRIGUEZ FIGUEROA, ALEX Operario7 AB007 CALENZANI GAMARRA, PEDRO Operario
8 AB008 MARTINEZ NORABUENA, MARCO Asistente9 AB009 CARMONA RODRIGUEZ, VILMA Asistente
10 AB010 VIDAL VALVERDE, SOFIA Secretaria11 AB011 PITA VELASQUEZ, CARLOS Asistente
12 AB012 MARTEL ROJAS, JACKELINE Administrador13 AB013 PALACIOS BASAS, LUIS Administrador
14 AB014 MURILLO GOMEZ, LUZ Secretaria15 AB015 PUENTE ARRIETA, JESSICA Asistente
16 AB016 MANRIQUE MEDINA, JUAN Operario17 AB017 SEGURA SANTISTEBAN, LUIS Gerente18 AB018 MERCADO ALARCON, MARTIN Operario19 AB019 QUEZADA MOGROVEJO, ANIBAL Gerente20 AB020 ANCHANTE SEGURA, HUBERT Gerente
SUELDO AFP
2000 EL ROBLE1500 NO AFILIADO
1000 HORIZONTE
1000 INTEGRA
1000 LA UNION
1000 NO AFILIADO
1000 EL ROBLE
900 INTEGRA
900 EL ROBLE
1200 NO AFILIADO
900 INTEGRA
1500 EL ROBLE
1500 LA UNION
1200 HORIZONTE
900 EL ROBLE
1000 LA UNION
2000 NO AFILIADO
1000 EL ROBLE
2000 LA UNION
2000 NO AFILIADO
Cree Macro que pida el Nombre, Edad y el Distritoel resultado se enviara por medio de una ventana emergente.
INPUT BOX
MSGBOX
Crear una VARIABLE ( q ocupa un espacio de memoria)
Pregunta
Cree Macro que pida el Nombre, Edad y el Distritoel resultado se enviara por medio de una ventana emergente.
chr(10) salto de linea
chr(9) tabulación
Ejercicio
1. Crear procedimiento que solicite ingreso de producto, precio y cantidadCalcule IMPORTE
ProductoPrecioCantidadImporte
y muestre por medio de MsgBox NOMBRE, PRODUCTO IMPORTE