Quote:
quote:Originally posted by goels
The issue that remains is when now I click on the âdisplay reportâ button an MS Office pop-up box opens which says âAre you sure you want to open the file. It might have virus etc..so onâ. Now if I click the âOKâ button on this pop-up box everything is fine and the report opens. But if I click on the âCancelâ button I get an error saying:
Run-time error â16388â
The hyperlink cannot be followed to the destination.
|
What you can do is do some error trapping. Change your event procedure like this:
Public Sub YourProcedureName()
On Error GoTo YourProcedureName_Err
{The rest of your procedure goes here}
YourProcedureNameExit:
Exit Sub
YourProcedureNameErr:
If Err.Number = 16388 Then
'The error is OK. Do Nothing.
Else
MsgBox Err.Description, vbExclamation, "Error " & Err.Number
End If
Resume YourProcedureNameExit
End Sub
Change "YourProcedureName" to match the real name.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division