Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
Creating a macro to close the set if a password is not introduced. A problem arose when executing "Thisapplication.document.closeall", error 438 arises. Can anyone tell me that I am doing wrong?.
The macro is as follows:
Public Sub Doc_c()
If Date <= DateSerial(2022, 11, 20) Then GoTo fin
On Error GoTo Ver_Error
licenciauso = InputBox("Enter the usage password")
If licenciauso <> "password" Then
MsgBox "Incorrect password"
ThisApplication.Document.CloseAll
End If
GoTo fin
Ver_Error:
ThisApplication.Document.CloseAll
fin:
End Sub
Thank you so much.
Solved! Go to Solution.