Open any Program from Excel
This free excel macro allows you to open any program on your computer from excel. You can open a media player, file viewer, image editor, internet browser, PowerPoint, Word, Outlook, or any other program on your computer. This is a really useful macro to, in essence, combine excel's functionality with that of another program. The vba code below can be used on its own or integrated into an existing macro in order to open some other program on your computer.
This macro uses a Shell Command to open a program.
To use this macro to open a program on your computer, you must enter the full file path to the program's executable file. So, you need to enter the file path from the harddrive through all the folders up to the file. Also, each executable file will end in a ".exe
" file format; don't forget to include that extension in the macro as well.
To change the file path and extension to point to the location of your program's executable file, simply change this line of code within the excel macro Shell ("C:\TEST\TEST.exe")
. Change the file path which is between the quotation marks to whatever your file path is.
Where to install the macro: Module
Open any Program from Excel
'Change the File Path below to point to any program
'on your computer. Don't forget to include the file extension
How to Install the Macro
- Select and copy the text from within the grey box above.
- Open the Microsoft Excel file in which you would like the Macro to function.
- Press "Alt + F11" - This will open the Visual Basic Editor - Works for all Excel Versions.
Or For other ways to get there, Click Here.
- On the new window that opens up, go to the left side where the vertical pane is located. Locate your Excel file; it will be called VBAProject (YOUR FILE'S NAME HERE) and click this.
- If the Macro goes in a Module, Click Here, otherwise continue to Step 8.
- If the Macro goes in the Workbook or ThisWorkbook, Click Here, otherwise continue to Step 8.
- If the Macro goes in the Worksheet Code, Click Here, otherwise continue to Step 8.
- Close the Microsoft Visual Basic Editor window and save the Excel file. When you close the Visual Basic Editor window, the regular Excel window will not close.
- You are now ready to run the macro.
Similar Helpful Excel Resources
Is there a code to get excel to open at a certain time of the day and run a programme? I want to be able to run a macro witout having to open excel .....please help.
can't open 2 excel program a once it stop letting me open
more than 1 in separate excel
I often use "file.. send to... mail recipient" to send a spreadsheet as text
in the body of an e-mail.
I prefer that to sending excel as an attachment, since my recipients may not
have excel and usually don't need to see formulas.
On my new computer however I get the message "excel could not open the
e-mail program" if I try the first option above.
Both excel 2002 and outlook 2002 are working fine. I "repaired" office
just to be sure. Still doesn't work.
Only difference is that the computer came with a trial version of office
2003 which I don't need.
Should I uninstall the trial version? Or is there some other fix?
When I open a second Excel file from explorer, Excel launches a second time.
How can I make any second (or third, etc) Excel file open in the first program?
If I open a second file through Excel itself, it opens in the same program, but it's more convenient to open files via explorer.
I'm using Excel 2003 and Vista.
Thanks in advace.
whe i click the excel icon i get the read only message, i know it can happen when you open i file that's read only but this is the excel program what can be wrong
i have an exe file in that file some formulas which are disable and this program sheet is not been saved and also at the same time i cant open new excel file any one said the solution
Is there any way to Open a Pdf (Already Given a Reply in this VBA Section). and Count the number of pages after that That Count to be Transfered to Excel Work Book?
If you have Answer Please Help this New Buddy.
Thanking you In Advance
VBA-How to program sizing and placing Excel window at the start of the program
I've recently completed a VBA add-in for Excel 2010 for use in my workplace. I don't think it's relevant, but the add-in launches a wizard for creating charts to my employer's exacting publication specs. I've placed the add-in in a central location my workplace's file server, but now I find I cannot move, delete or save over the .xlam file. Windows tells me "The action can't be completed because the file is open in another program". I have tried closing excel, removing the add-in from my local add-ins folder, to no avail. I am reasonably certain no one on the network has the file itself open (although they may have added it to their local add-ins folders). Given that I would like to update the Add-in with bug fixes and the like without filling the folder with multiple, similarly named version, this is a bit of a problem.
Any suggestions would be appreciated.
I have a macro that runs another series of macros that rip data off of a worksheet saved in the same directory. The code is set up so that it opens the required workbook and then performs a copy&paste special values and formats. However, each function is designed to work independently as well as in series... but when you run an individual macro, and then try to run a second individual macro it returns "Workbook already open, do you want to reopen - will cause you to lose changes."
Is there a bit of code that can simply turn off the open workbook function if it is already open?
Thanks in advance.