UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Followhyperlink, Access 2013    
 
   
jokeme71
post Dec 1 2017, 03:07 PM
Post#1



Posts: 918
Joined: 7-June 02
From: Maryland


I have a desktop shortcut ("C:\Program Files\Program1\Program1.exe" -l test1://1.1.1.1:1 -s "My Thing") that opens an application with no issues as all. I want to assign this to a command button on a form but it is not working. I tried the following but receive run-time error 490: Cannot Open Specified File. What am I missing? Any help would be greatly appreciated!

Application.FollowHyperlink("""C:\Program Files\Program1\Program1.exe"" " & "-l test1://1.1.1.1:1 -s" & " ""My Thing""")
Go to the top of the page
 
theDBguy
post Dec 1 2017, 03:16 PM
Post#2


Access Wiki and Forums Moderator
Posts: 73,276
Joined: 19-June 07
From: SunnySandyEggo


Hi Steve,

Try using Shell instead.

Hope it helps...
Go to the top of the page
 
jokeme71
post Dec 1 2017, 03:31 PM
Post#3



Posts: 918
Joined: 7-June 02
From: Maryland


How would I use Shell in this instance?
Go to the top of the page
 
theDBguy
post Dec 1 2017, 04:00 PM
Post#4


Access Wiki and Forums Moderator
Posts: 73,276
Joined: 19-June 07
From: SunnySandyEggo


You could try something like:

Shell """C:\Program Files\Program1\Program1.exe"" " & "-l test1://1.1.1.1:1 -s" & " ""My Thing"""

Hope it helps... (you may have to play with the positions and number of quotes to use)
Go to the top of the page
 
jleach
post Dec 3 2017, 02:43 PM
Post#5


UtterAccess Editor
Posts: 9,931
Joined: 7-December 09
From: Staten Island, NY, USA


We have a wiki link on the topic: http://www.UtterAccess.com/wiki/Opening_Files_From_Access

There's basically three ways: Hyperlink, Shell or ShellExecute, each of which gets handled slightly differently and their own caveats. That article describes them. ShellExecute is usually the preferred method, IMO.

Cheers,
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    25th September 2018 - 04:11 PM