×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Icon to open an Excel file

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

RE: Icon to open an Excel file

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."

RE: Icon to open an Excel file

What version of SW are you using?

RE: Icon to open an Excel file

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."

RE: Icon to open an Excel file

(OP)
I am using SW2004 Sp3.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources