Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations The Obturator on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Icon to open an Excel file

Status
Not open for further replies.

btcoutermash

Industrial
Feb 2, 2004
108
All,
I have an Excel document that I would like to have opened in solidworks thru an icon. I would like the icon to be in one of my toolbars. From what I have read you can associate macros to icons, but I do not see how/if you can do that with a strait document. I am not well versed on recording macros either.

THank You
Brad
 
Replies continue below

Recommended for you

HERE'S COPY OF MY REMINDER NOTE I KEEP IN OUTLOOK
YOU ARE GOING TO NEED TO USE THE SECOND CALL TO OPEN A SPECIFIC FILE

Option Explicit

Dim MyAppID
Dim ProgStart As String

Sub main()

' Program starts as normal window with focus (the parameter 1).
' If the program is not in the PATH you have to enter the complete path to the exe.
' Returns an handle for that instance

ProgStart = "calc.exe"
MyAppID = Shell(ProgStart, 1)

' you may also provide parameters (like the file to be opened).
' ATTENTION: if there are spaces in the parameters you have to enclose them in '

'ProgStart = "notepad.exe 'D:\daten\solidworks macro.swb'"
'MyAppID = Shell(ProgStart, 1)

AppActivate MyAppID

End Sub

Good Luck



Remember...
"If you don't use your head,
your going to have to use your feet."
 
Forgot about that...

This was found, and used with 2001+ on an NT machine.

Have not used for a while but will get my original macro up on 2005 (WinXP Pro) and see if it functions.




Remember...
"If you don't use your head,
your going to have to use your feet."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor