Hola a todos
Gracias por sus aportes y comentarios, y a los administraadores de esta página. Solicito ayuda por favor
Tengo el siguiente código que después de encriptar el serial del disco del computador, "quisiera que me permitiera", cerrar la página de BIENVENIDA, la oculte, y abra las otras hojas, que están ocultas.
Pero despues de darle click al commandbutton del formulario respectivo, se queda como en un bucle y no hace absolutamente nada.
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False ' Ocultar el procedimiento xa que no se vea la ejecucion de la macro
If Trim(txtSerial.Text) = "" Then
MsgBox "Ingrese la clave suministrada por su Proveedor", vbCritical, "Error"
Unload frmSerial
Else
If Trim(txtSerial.Text) <> Trim(Sheets("xxx").Range("A2").Value) Then
MsgBox "La clave ingresada es incorrecta", vbCritical, "Error"
'guardo uno 0 (cero) para saber que han fallado:
Sheets("xxx").Range("a3").Value = 0
Else
'luego de eso es conveniente colocar un "Control" para
'avisarle a excel que el libro fué desbloqueado correctamente
'ese Control será leído cada vez que se abra el libro: ("xxx")
Sheets("xxx").Range("A3").Value = 1
' XXXXXXXXXXXXXXXXXXXXXXXXXXXX
' Aviso de Bienvenida al Programa
If TextBox1.Value = "" Then
MsgBox "Debe digitar el nombre de la empresa primero. . . " & _
vbNewLine & _
vbNewLine & " ", vbInformation
Else
If Range("CIA").Value <> "" Then
VarRespuesta = MsgBox("Son las " & Time & " Tiempo de Reflexionar. " & " El Programa ha sido Registrado Correctamente ? ? ?. ", vbInformation + vbYesNo, " VISUAL TOURS WELCOME")
If Time < TimeValue("11:30:00") Then MsgBox "Hoy es Día de Bendición. . . . Que tenga un buen día ! ! ! ", vbInformation, " VISUAL TOURS WELCOME"
If Time > TimeValue("12:00:00") And Time < TimeValue("18:30:00") Then MsgBox "Vuelva a llamar el Formulario. Buenas Tardes ! ! ! ", vbInformation, " VISUAL TOURS WELCOME"
If Time >= TimeValue("18:30:00") Then MsgBox "Vuelva a llamar el Formulario. Buenas Noches!!! ", vbInformation, " VISUAL TOURS WELCOME"
Else
If VarRespuesta = vbYes Then
Range("CIA").Value = TextBox1
Range("NIT").Value = TextBox2
' XXXXXXXXXXXXXXXXXXXXXXXXXXXX
Sheets("BIENVENIDA").Visible = False
Sheets("BUSCAR").Visible = True
Sheets("BUSCAR").Select
Hoja1.Visible = True
Hoja2.Visible = True
Hoja3.Visible = True
Hoja4.Visible = True
Hoja5.Visible = True
End If
End If
End If
End If
End If
ActiveWorkbook.Save
End Sub
Gracias a todos nuevamente por sus aportes



