Seguidores

viernes, 8 de noviembre de 2019

EXCEL









DESCARGA SISTEMAS EN EXCEL DE AQUI
https://www.excelnegocios.com/descargas/

CODIGO PARA SUMAR

Private Sub CommandButton1_Click()
Range("B3") = Range("B1") + Range("B2")
End Sub
CODIGO PARA RESTAR
Private Sub CommandButton2_Click()
Range("B3") = Range("B1") - Range("B2")
End Sub
CODIGO PARA SIGUIENTE PAGINA DE EXCEL
Private Sub CommandButton3_Click()
Sheets(2).Activate
End Sub
CREAR













Sub agregar()
Dim num As Integer
'CONTAR CELDAS LLENAS
num = Application.Count(Range("C7 : C50")) + 7
' RELLENAR CELDAS
Range("A" & num) = Range("B1")
Range("B" & num) = Range("B2")
Range("C" & num) = Range("B3")
Range("D" & num) = Range("B4")
Range("E" & num) = Range("B3") * Range("B4")
'LIMPIAR CELDAS
Range("B1: B4") = ""
'ACTIVAR CELDA PARA LLENAR NUEVO DATO
Range("B1").Activate
End Sub


CODIGO PARA USAR UN FORMULARIO
End Sub
Sub SIGUIENTE()
Sheets(3).Activate
End Sub
'CODIGO PARA VER EL FORMULARIO
Sub agregar2()
UserForm1.Show
End Sub





Private Sub CommandButton2_Click()

Range("A4") = txcod.Text
Range("B4") = txdes.Text
Range("C4") = txpre.Text
Range("D4") = txcan.Text
Range("E4") = txcan.Text * txpre.Text
End Sub

Private Sub CommandButton3_Click()
End
End Sub

CODIGO PARA AGREGAR
Private Sub CommandButton2_Click()
Dim num As Integer
num = Application.Count(Range("C4 : C50")) + 4
Range("A" & num) = txcod.Text
Range("B" & num) = txdes.Text
Range("C" & num) = txpre.Text
Range("D" & num) = txcan.Text
Range("E" & num) = txcan.Text * txpre.Text
End Sub

CODIGO COMPLETO
Private Sub CommandButton2_Click()
Dim num As Integer
num = Application.Count(Range("C4 : C50")) + 4
Range("A" & num) = txcod.Text
Range("B" & num) = txdes.Text
Range("C" & num) = txpre.Text
Range("D" & num) = txcan.Text
Range("E" & num) = txcan.Text * txpre.Text
End
End Sub

Private Sub CommandButton3_Click()
End
End Sub 

Private Sub CommandButton4_Click()
Dim num As Integer
num = Application.Count(Range("C4 : C50")) + 4
Range("A" & num) = txcod.Text
Range("B" & num) = txdes.Text
Range("C" & num) = txpre.Text
Range("D" & num) = txcan.Text
Range("E" & num) = txcan.Text * txpre.Text
txcod.Text = ""
txdes.Text = ""
txpre.Text = ""
txcan.Text = ""
End Sub

No hay comentarios.:

Publicar un comentario

netbeans java

LEJGUAJE DE PROGRAMACION I Ejercicios sobre operadores aritméticos Java Ejercicio 1: Si a, b y c son variables enteras con valores a=8, b=...