Boqueo de celdas al cargar userform con animación
Hice un userform con animación tipo matrix en excel de bienvenida, este funciona muy bien, sin embargo cuando finaliza y me habré el área de trabajo no puedo escribir ni hacer nada, tengo que entrar al diseño e interrumpir la macro, me pueden ayudar a resolver esto.
Anexo código.
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:15"), "Quitform"
Dim cCntrl As Control, u, x As Double
For x = 1 To 500
Set cCntrl = Me.Controls.Add("Forms.label.1", , True)
With cCntrl
.Font.Bold = True
.BorderStyle = fmBorderStyleNone
.SpecialEffect = fmSpecialEffectFlat
.ForeColor = &H9000&
.BackColor = vbBlack
.Width = 7
.Height = 100
.Top = Application.WorksheetFunction.RandBetween(0, Me.Height)
.Left = Application.WorksheetFunction.RandBetween(0, Me.Width)
End With
Next
Call nieve
End Sub
Sub nieve()
Dim cCntrl As Control, u, x As Double, srt, letra As String
'srt = "abcdefghijklmnopqrstuvwxyz" '26
'srt = "012345678909876543210" '20
'srt = "12345PROSA6789009PROSA8765PROSA43210" '20
srt = "!#$6%&/A()9=?¡¨*[B]_2:;¬\@5!#Z$%2&/?=1R)[]:;W_" '35
o:
For Each cCntrl In Me.Controls
Sleep 1 / 5
DoEvents
letra = Right(UCase(srt), Application.WorksheetFunction.RandBetween(1, 35))
cCntrl.Caption = letra
cCntrl.Top = cCntrl.Top + 10
On Error Resume Next
If cCntrl.Top > Me.Height Then cCntrl.Top = 0
Next
GoTo o
End Sub