Category Archives: API Call

ShellExecute VBA Example (For All FileTypes)

This post is in response to an email question I received.

Basically the person wanted to open an Excel file on their network using a command button in their application.

From a button or a shape on your worksheet:

…assign the following macro (VBA) code:

This code opens any type of file with the program specified to open the type of file:

This opens txt, pdf, docx, xlsx, etc files.

Let me know if you have any questions.