Icon to open an Excel file
Icon to open an Excel file
(OP)
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
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






RE: Icon to open an Excel file
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."
RE: Icon to open an Excel file
RE: Icon to open an Excel file
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."
RE: Icon to open an Excel file