Jump to content
  • Advertisement
Sign in to follow this  
Mulligan

Excel VB Macro

This topic is 4885 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an excel macro that detects the current spreadsheet being closed and runs: Private Sub App_WorkbookBeforeClose(ByVal Wb As Workbook, Cancel As Boolean) MsgBox "App_WorkbookBeforeClose: " & Wb.Name End Sub Now I suck with VB, but before I bang my head against a wall trying to figure this out, Is there a way of having App_WorkbookBeforeClose run another executable? Is this possible?

Share this post


Link to post
Share on other sites
Advertisement
Search in MSDN Library or in the internet for the Shell function.
The shell function must be available from VBA.
This function spawns a process by passing a path to an exe file.
This function spawns a process, but unlike CreateProcess, it don't take ownership of the process, so when excel is closed the spawned process remains alive.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!