Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default load a PDF file with VBA

I have a userform that loads files and the user double clicks on file and I
want to be able to load a pdf file, I have tried the shell method and
createObject non of these work can someone help please.
TIA
Charles
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default load a PDF file with VBA

Have you try this

Try

ActiveWorkbook.FollowHyperlink "C:\Test.pdf"

Or this example that Jim Rech posted

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Sub LaunchPDF()
ShellExecute 0, "Open", "c:\File.pdf", "", "", 1
End Sub


--



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"vqthomf" wrote in message ...
I have a userform that loads files and the user double clicks on file and I
want to be able to load a pdf file, I have tried the shell method and
createObject non of these work can someone help please.
TIA
Charles

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to load .xla file automatically? Eric Excel Discussion (Misc queries) 1 November 17th 08 01:04 PM
How do I load a file from URL Peter[_58_] Excel Programming 2 July 27th 06 01:48 PM
File will not load Jack Sheet Excel Discussion (Misc queries) 3 December 4th 04 01:41 PM
Is it possible to load an .xls file Jako[_55_] Excel Programming 2 August 2nd 04 11:29 PM
How to load a help file using VBA Ian[_9_] Excel Programming 2 January 30th 04 02:19 PM


All times are GMT +1. The time now is 03:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"