You are on page 1of 5

CLASE DE LABORATORIO 11: 3:00 8:20 PM

Curso: Excel Avanzado


Profesora: Vernica Rutina

Filtros:
Ubicarse dentro de la celda base de datos
Ficha de Datos / Filtro

Tabla Dinmica:
Seleccionar la base de datos
Ficha insertar
Tabla dinmica

EXCEL CON VBA:
ALT + F11 (Ingresar a VBA)





Dim y As Integer
Dim p As Single
Dim total As Integer
Dim totaligv As Single

Private Sub ComboBox1_Change()
End Sub

Private Sub TextBox3_Change()
End Sub

Private Sub UserForm_Activate()
ComboBox1.AddItem ("Pastilla")
ComboBox1.AddItem ("Jarabe")
ComboBox1.AddItem ("Capsula")
ComboBox1.AddItem ("Inyeccion")
ComboBox1.AddItem ("Crema")
End Sub

Private Sub CommandButton1_Click()
If Me.ComboBox1.Text = "Pastilla" Then
y = 2
End If
If Me.ComboBox1.Text = "Jarabe" Then
y = 10
End If
If Me.ComboBox1.Text = "Capsula" Then
y = 2
End If
If Me.ComboBox1.Text = "Inyeccion" Then
y = 10
End If
If Me.ComboBox1.Text = "Crema" Then
y = 12
End If

p = Val(TextBox3.Text)
total = p * y
Me.TextBox4.Text = total
totaligv = Round(total * 1.18, 2)
Me.TextBox5.Text = totaligv

End Sub


Dim y As Integer
Dim p As Single
Dim total As Integer
Dim totaligv As Single

Private Sub ComboBox1_Change()
End Sub

Private Sub TextBox3_Change()
End Sub

Private Sub UserForm_Activate()
ComboBox1.AddItem ("Pastilla")
ComboBox1.AddItem ("Jarabe")
ComboBox1.AddItem ("Capsula")
ComboBox1.AddItem ("Inyeccion")
ComboBox1.AddItem ("Crema")
End Sub

Private Sub CommandButton1_Click()
If Me.ComboBox1.Text = "Pastilla" Then
y = 2
End If
If Me.ComboBox1.Text = "Jarabe" Then
y = 10
End If
If Me.ComboBox1.Text = "Capsula" Then
y = 2
End If
If Me.ComboBox1.Text = "Inyeccion" Then
y = 10
End If
If Me.ComboBox1.Text = "Crema" Then
y = 12
End If

p = Val(TextBox3.Text)
total = p * y
Me.TextBox4.Text = total
totaligv = Round(total * 1.18, 2)
Me.TextBox5.Text = totaligv

End Sub


Dim y As Integer
Dim p As Single
Dim total As Integer
Dim totaligv As Single

Private Sub ComboBox1_Change()
End Sub

Private Sub TextBox3_Change()
End Sub

Private Sub UserForm_Activate()
ComboBox1.AddItem ("Pastilla")
ComboBox1.AddItem ("Jarabe")
ComboBox1.AddItem ("Capsula")
ComboBox1.AddItem ("Inyeccion")
ComboBox1.AddItem ("Crema")
End Sub

Private Sub CommandButton1_Click()
If Me.ComboBox1.Text = "Pastilla" Then
y = 2
End If
If Me.ComboBox1.Text = "Jarabe" Then
y = 10
End If
If Me.ComboBox1.Text = "Capsula" Then
y = 2
End If
If Me.ComboBox1.Text = "Inyeccion" Then
y = 10
End If
If Me.ComboBox1.Text = "Crema" Then
y = 12
End If

p = Val(TextBox3.Text)
total = p * y
Me.TextBox4.Text = total
totaligv = Round(total * 1.18, 2)
Me.TextBox5.Text = totaligv

End Sub

You might also like