Solved

I want to Open a short cut  on my desktop using VBA or MS Access

Posted on 2008-10-14
8
422 Views
Last Modified: 2013-11-28
Dim a as Object
Dim str as string
Dim Target  As string
Dim Startin  AS string


Target = "C:\Program Files\Sage Software\V420JO\MAS90\Home\pvxwin32.exe" -hd ..\launcher\sota.ini ..\soa\startup.m4p -arg direct uion vbc "" JOB jt_timetrackerlaborimport_ui AUTO

Startin ="C:\Program Files\Sage Software\V420JO\MAS90\Home"
str = Target &  Startin
a = SHELL(str,vbNormalFocus)

0
Comment
Question by:daruffin
  • 4
  • 2
  • 2
8 Comments
 
LVL 12

Expert Comment

by:jazzIIIlove
ID: 22715277
0
 

Author Comment

by:daruffin
ID: 22715444
This only tells me how to create a short cut I need to open a short cut using the shell command. I want to click a button on my MS Access form and open this short cut which is located on my desktop.
0
 
LVL 12

Expert Comment

by:jazzIIIlove
ID: 22715470
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

by:daruffin
ID: 22715649
You keep sending me how to create a short cut. I want to run my shortcut which is already created on my desktop and This shortcut run another program. How can I run this short using the Shell command
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 250 total points
ID: 22728605
daruffin,

Is your question simply: How to Open a Shortcut?
Or more specifically:  How to Open a Shortcut using the Shell command?

Because you can open a shortcut quite easily by treating it as a Hyperlink
Try something like this:

Application.FollowHyperlink "C:\Documents and Settings\user\Desktop\NameOfYourShortCut.lnk"

(If you get a hyperlink warning, you can disable it for good by seeing this link: http://support.microsoft.com/kb/829072/en-us)

JeffCoachman

0
 

Author Comment

by:daruffin
ID: 22734904
Let me try this and I will get back to you
0
 

Author Closing Comment

by:daruffin
ID: 31506047
This worked out well
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 22771587
;-)
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question