Pop up box when i open or try to open pdf using command button

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,699
Office Version
  1. 2007
Platform
  1. Windows
I have a worksheet that has numerous command buttons on.
Each command button opens the relevant pdf file.

Lately i see the following pop up box.
Clicking ok continue to open the pdf no problem.

Image of message also supplied
Example of the code in use.

Rich (BB code):
Private Sub BikeKeys_Click()
ThisWorkbook.FollowHyperlink "C:\Users\Ian\Desktop\REMOTES ETC\PDF\BIKE-KEYS.pdf"
End Sub
 

Attachments

  • EaseUS_2023_06_27_19_10_46.jpg
    EaseUS_2023_06_27_19_10_46.jpg
    23 KB · Views: 17

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Check this thread: MS Office Warning (Some files can contain viruses)

I'm aware you can disable this warning by tinkering with the Windows registry, but first you could try this:-
VBA Code:
   Dim oShall As Object
   Set oShell = CreateObject("WScript.Shell")
   oShell.Run """C:\Users\Ian\Desktop\REMOTES ETC\PDF\BIKE-KEYS.pdf"""

Any good?
 
Upvote 0
Solution
Thanks for the response. I'm not sure what to do with this. Maybe in the Worksheet_FollowHyperlink event?
 
Upvote 0
Check this thread: MS Office Warning (Some files can contain viruses)

I'm aware you can disable this warning by tinkering with the Windows registry, but first you could try this:-
VBA Code:
   Dim oShall As Object
   Set oShell = CreateObject("WScript.Shell")
   oShell.Run """C:\Users\Ian\Desktop\REMOTES ETC\PDF\BIKE-KEYS.pdf"""

Any good?

Perfect did the trick.

Have a nice evening
 
Upvote 0
Thanks for the response. I'm not sure what to do with this. Maybe in the Worksheet_FollowHyperlink event?
Remove the ThisWorkbook.FollowHyperlink statement from the existing BikeKeys_Click() routine and insert my three lines of code.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top