A los buenos días.
Alguien puede decir que bobada estoy haciendo, y de la cual no encuentro la causa?
frmCierreAño es un formulario
mrc2 es un marco en frmCierreAño
Casilla es un control Public
Sub Mostrar_Formulario_Con_Errores()
With frmCierreAño ' Aparto el marco2. Muestro el listbox que llenaré con los errores.
.mrc2.Left = 0
End With
With .lbErr: .Left = mrc2.Width + 1 / 8 * frmCierreAño.Width: .Visible = True: End With
With .etNota: .Left = lbErr.Left: .Top = 6: .Width = lbErr.Width: .Height = : End With
With .etNota: .BackColor = Rojo: .Caption = "Diario con Errores": End With
.cmdVerificar.Visible = False
With .cbImpErr: .BackColor = Rojo: .Visible = True: End With
End With
'*********** Esta parte no funciona ¿ Donde esta mi genialidad?***
' hay: 2 label, 2 Texbox, 2 Commandbutton, 5 optionbutton
For Each Casilla In frmCierreAño.mrc2.Controls
If Casilla.Name = cmdSalir Then
Casilla.Visible = True
Else
Casilla.Visible = False
End If
Next Casilla
'********************************************************
' Este sí funciona
For Each Casilla In frmCierreAño.Controls
If TypeOf Casilla Is MSForms.CheckBox Then
If Casilla.GroupName = "infVerificar" Then Casilla.Visible = True
End If
Next Casilla
End Sub
Saludos y ... Excel entes vibraciones
Des As Tres No imprimas, ganemos un árbol... o tres hojinas
.
Leer las respuestas