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

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,226
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: 10

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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,215,183
Messages
6,123,529
Members
449,105
Latest member
syed902

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