Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA or Solution to Get Past Microsoft Security Warning

Status
Not open for further replies.

Randy11

Technical User
Oct 4, 2002
175
0
0
CA
Looking for assistance to help get past Microsoft Office Security Notice (This Location May be Unsafe)

Have added command button in Worksheet to act as a hot link to open the noted Database.
Code runs & Pops you imediatelty into lotus notes where database is & sits. Click back on your Excel file to find the MS Security Warning as noted above has popped up to hold up progress. As soon as you click ok to the warning, it immediately launches the Database as desired....

Is there a way to;
1)temporarily turn off this notification & turn back on at the end of the code.
or
2) add into the VBA code that this is an accepted location
or
3) or by VBA say ok to the Security warning?

Sub Link_to_Client_Database()
'
Application.ScreenUpdating = False
On Error Resume Next
AppActivate "Lotus Notes"
If Not Err.Number = 0 Then
Err.Clear
MsgBox "Open your Lotus Notes and proceed to GL Database", vbInformation, "GL Database"
Else
Application.ThisWorkbook.FollowHyperlink Address:="Notes:XPro13\Client\ClientD_Base.nsf", NewWindow:=True
End If

Exit Sub
Application.ScreenUpdating = Truee

End Sub
 


Can you not go to your Trust Center and CHANGE whatever needs to be changed for THIS LOCATION?

This is NOT something that can be coded!

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Wouldn't be much a a security warning if you could just code your way past it ...
 
On this Thread, would like to consider another approach. As the security settings of users machine is not within our control........

The only real issue with the code is that Lotus notes Activates & in Excel the security message comes up for a user response. i.e. yes or no location is safe go there...
So the user is sitting looking at Lotus notes waiting for it to do something.

Is there a way to write an if statement into the code that has the code behave as follows?
If Lotus Notes Database requested opens right away do nothing except go to Lotus Notes Database. If Microsoft Excel Security Centre Warning Message comes up, show message for user response. i.e. Bring security message to the forefront so user can respond.

Any assisted appreciated.
 
How about telling your users they shouldn't open email attachments from the emails - they should save the attachments to their drives, first, then open them from there. All to often people open and edit email attachments, then wonder why they can't find all the changes next time they open the same attachment... Lotus Notes may even have a setting to prevent opening (but not saving) attachments.

Cheers
Paul Edstein
[MS MVP - Word]
 
Hi Paul Sorry if I wasn't clear though I agree with your comments.

We have an excel workbook used by a number of individuals. Within that there is a button click option to launch a Lotus Notes Database they often need to refer to. The VBA simply saves the user some steps to open that database. The issue is that Excel MS Security message comes up behind the Lotus Notes Application when it attempts to launch the database and the user is not aware it is there (if they activate the workbook again they will see it). All I am looking for is a way for this security message to come to the front so the user can immediately see it and respond to it.

Appreciate any ideas you have on this....

 
Perhaps you could set the Lotus Notes Database object's visibility to False when the application is started (ie '.Visibility = False'). That should leave Excel visible. If you follow the '.Visibility = False' statement with another one setting it back to True again, you might find the second statement won't execute until the message box has been dismissed.

Cheers
Paul Edstein
[MS MVP - Word]
 
What about the AppActivate method ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
What about the AppActivate method ?
What about it? The OP already has:
AppActivate "Lotus Notes"

Cheers
Paul Edstein
[MS MVP - Word]
 
Still looking for ideas on this. In poking around is there a way to use "ShellExecute" instead of the "Application.ThisWorkbook.FollowHyperlink Address" that is currently written. Is my understanding that there may be a way to avoid the warning message alltogather via this method. The Lotus Notes Database am trying to launch is an internal one and is a safe location.
Appreciate ideas on how to apply this & replace the hyperlink code line that triggers the MS Security Message.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top