Operating System : Windows 7, 64-bit
Excel Version : 2010, 32-bit
Problem:
When the following code executes, I get the MsgBox output and the immediate window (Debug.Print Err) shows 53 (which I believe is the "File not Found" error). However, the file is most definitely there as I have run it through the Start Menu\Run as well as through Windows Explorer. How do I run/launch the SnippingTool from within Excel? Please help.
VBA Code (as follows)
Option Explicit
Sub Run_SnippingTool()
Dim taskID As Variant
On Error Resume Next
taskID = Shell("C:\windows\system32\SnippingTool.exe", 1)
Debug.Print Err
If Err <> 0 Then MsgBox "Snipping Tool is not installed on this system."
End Sub
Additional Information :
This Macro is a part of a custom tab on the Ribbon where I would like to provide a few tools such as "Calculator", "Notepad", "Snipping Tool". These would come really handy when a user is working with this specific workbook. The same code for Calculator and Notepad works fine, but for the Snipping Tool it doesn't. However, as I would be sharing this workbook with different users, the solution needs to be such that all the necessary code/objects should be on this one single workbook.
Warm regards,
Jewel
Bookmarks