Shell to Snipping Tool - returns Run-time error 53 File not found

Ruddles

Well-known Member
Joined
Aug 24, 2010
Messages
5,845
Office Version
  1. 365
Platform
  1. Windows
I'm using Office 2007 under Windows 7. I have a button on an Excel worksheet which shells to the Snipping Tool to allow the user to manually capture part of the screen:-
Code:
Shell "c:\windows\system32\snippingtool.exe", vbNormalFocus
This returns a Run-time error 53 File not found. The same happens if I run that command from the Immediate window (or in fact from MS Access). However if I put Notepad.exe in the Shell command, Notepad starts without a hitch.

SnippingTool.exe is definitely in C:\Windows\System32\ and it runs okay from the Start Run... button. It also works okay under Vista.

Why should Notepad run but not the Snipping Tool? Has anyone else come across this? Can anyone with Windows 7 please spare a moment to confirm their system exhibits the same behaviour?

TIA,
R.

Xposted at http://www.ozgrid.com/forum/showthread.php?t=145767 three weeks ago: not a single response received.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I can confirm that it does work in Vista...

Anyone with Win7 to check if not available?

That is neat, I am now wondering if possible to have VB automatically take a snip and save.?

Give you a bump to the top and maybe even a sliver of hope to know that your question did not get lost.
 
Upvote 0
Sorry - I cannot test it - but could it be something connected with the User Access restrictions and its settings??? more like the rights of VBA or the user to access certain applications?
 
Upvote 0
well - i found a way of testing - really failed
tested on Windows 7 + Excel 2003 & 2007
found out that shell command sometimes fails on 64-bit systems
suggest a workaround:
create a BAT file with the command line in it:
c:\windows\system32\snippingtool.exe

then use shell to call the BAT file:
Shell "c:\snip.BAT", vbHide

HTH

P.S.: if this does not help try to create a copy of snippingtool.exe somewhere otsyde of the system folders and run it from there - may be some security permissions issue for 64 bit (it turned out it's not the UAC)
 
Last edited:
Upvote 0
solution/workaround found:
this is tested and worked on a 64 bit Windows7:
a copy of snippingtool.exe was created in the root of drive D:\
then the next line succesfully started the program:
Shell "D:\snippingtool.exe", vbNormalFocus

HTH
 
Upvote 0
Solution
Domo arigato, Bobsan! Yes, it runs from another location, just not c:\windows\system32. But I've checked the permissions and everyone has execute rights in that folder so there should not be a problem.

Ah well, sometimes "Windows is like that". :confused:

Thanks again.
 
Upvote 0
well glad it worked for you even if it's not a neat solution.
the problem with widows security, permissions and restrictions, is quite complicated in XP so i guess it's even worse in 7.
i found a few complaints in the net for similar problems - especially for the 64 bit systems.
guess we'll never know the next surprise from m$ ...
if i remember correctly i heard or read somewhere that m$ " ... sacrificed "a bit" of compatibility in the name of security ..." after XP
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,731
Messages
6,126,539
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top