My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
![]() Posts: 898 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""") |
![]() Post#2 | |
![]() Access Wiki and Forums Moderator Posts: 71,921 Joined: 19-June 07 From: SunnySandyEggo ![]() | Hi Steve, Try using Shell instead. Hope it helps... -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Microsoft Access MVP | Access Website | Access Blog | Email |
![]() Post#3 | |
![]() Posts: 898 Joined: 7-June 02 From: Maryland ![]() | How would I use Shell in this instance? |
![]() Post#4 | |
![]() Access Wiki and Forums Moderator Posts: 71,921 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) -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Microsoft Access MVP | Access Website | Access Blog | Email |
![]() Post#5 | |
![]() UtterAccess Editor Posts: 9,896 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, -------------------- Jack D. Leach Dymeng Services | Dymeng Blog | Wrox Technical Contributor UA Wiki: Articles | Function Library | Contributing Kicking it to the Cloud: Transitioning to Azure from a desktop developer's perspective |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 22nd April 2018 - 07:44 AM |