AnsweredAssumed Answered

Open Solidworks Shortcut with VBA

Question asked by Christian Mills on Jul 26, 2019
Latest reply on Jul 26, 2019 by Artem Taturevych

I have created a shortcut on my desktop that will automatically run a macro on solidworks startup. Now i want to open that shortcut using an excel macro.

It tells me I have the wrong file path but I have triple checked and know that it is correct.

Below is my code.

 

Sub RunFile()
Dim MyFile As String, Cmd As String
MyFile = "C:\Users\christian.mills\Desktop\Solidworks.Quick.Quotes.lnk"
Cmd = "RunDLL32.EXE shell32.dll,ShellExec_RunDLL "
Shell (Cmd & MyFile)
End Sub

Outcomes