Jump to content

Ayuda con boton modificar de un formulario


Go to solution Solved by Antoni,

Recommended Posts

Buenas tardes, expertos por favor me pueden ayudar tengo un formulario que fuciona perfectamente los botones nuevo, registrar, eliminar y salir; pero en cuanto modificar me funciona raro cuando selecciono una fecha dentro del combobox  la "X" me imprime en la fila de los titulos, antes que insertara el control combobox si funcionaba el boton modificar perfecto, este codigo adjunte al en modificar:

            If cmbFecha.Text = Hoja1.Range("P4") Then
                Hoja1.Cells(Fila, 16) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("Q4") Then
                Hoja1.Cells(Fila, 17) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("R4") Then
                Hoja1.Cells(Fila, 18) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("S4") Then
                Hoja1.Cells(Fila, 19) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("T4") Then
                Hoja1.Cells(Fila, 20) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("U4") Then
                Hoja1.Cells(Fila, 21) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("V4") Then
                Hoja1.Cells(Fila, 22) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("W4") Then
                Hoja1.Cells(Fila, 23) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("X4") Then
                Hoja1.Cells(Fila, 24) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("Y4") Then
                Hoja1.Cells(Fila, 25) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("Z4") Then
                Hoja1.Cells(Fila, 25) = "X"
            ElseIf cmbFecha.Text = Hoja1.Range("AA4") Then
                Hoja1.Cells(Fila, 26) = "X"
            Else
            End If

Por favor me pueden ayudar los agradecere bastante; Adjunto el archivo.

Asistencia.xlsm

Link to comment
Share on other sites

JasallBcn, solo el código que adjunte es el error porque cuando lo saco funciona bien es por eso que señale esas líneas de código... Muchas gracias

Link to comment
Share on other sites

JasallBcn, muchas gracias funciona en gran parte, en algunas filas y columnas no imprime la X

Link to comment
Share on other sites

Antoni, muchas gracias ya lo he probado en la mayor parte de las asistencias y funciona perfectamente, creo que queda ahi por favor muchas gracias, eres un genio

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Privacy Policy