Please Help,
I have run across a problem where I am forced to use a VBA macro in bringing up a word document (the word document is setup with a Password). When clicking on the macro, a pop up window will appear asking for a Password! I can view the word document (Read Only, which works great ), but if click on “CANCEL” or the OK Button, A Microsoft Visual Basic Error Debug Pop Up Window will appear giving a error code of “Run Time Error 5408” . ( ***Please remember to have the word document setup with a Password.***)
Below is what I have. Is there a way to trap the error code?
Sub PRD77()
Dim appWord As New Word.Application
Dim docWord As Word.Document
Set docWord = appWord.Documents.Open("S:\VB2 Product Development\PRDs\PRD#77-
Instant VB2 User Registration\PRD#77-InstantVB2UserRegistration.doc")
appWord.Visible = True
End Sub
Please help...
I have run across a problem where I am forced to use a VBA macro in bringing up a word document (the word document is setup with a Password). When clicking on the macro, a pop up window will appear asking for a Password! I can view the word document (Read Only, which works great ), but if click on “CANCEL” or the OK Button, A Microsoft Visual Basic Error Debug Pop Up Window will appear giving a error code of “Run Time Error 5408” . ( ***Please remember to have the word document setup with a Password.***)
Below is what I have. Is there a way to trap the error code?
Sub PRD77()
Dim appWord As New Word.Application
Dim docWord As Word.Document
Set docWord = appWord.Documents.Open("S:\VB2 Product Development\PRDs\PRD#77-
Instant VB2 User Registration\PRD#77-InstantVB2UserRegistration.doc")
appWord.Visible = True
End Sub
Please help...