Needing help with code in a macro

  • Thread starter Thread starter MWhaley
  • Start date Start date
Sub Macro1()
Application.ActivateMicrosoftApp Index:=0
End Sub
 
You are very welcome! If you get tired of "calculating", use a -1 rather than
0 in the macro.
 
That's a new one for me... interesting, though, it seems Index=0 is not
documented in the help files.

By the way, there is a shorter statement that will also bring up the
calculator (on PCs)...

Shell "Calc"

Rick
 
Is this some sort of "Easter Egg" program hidden away in Excel? If so, I'm
thinking it may have been removed with the latest Service Pack. I have Excel
2003 and when I execute that statement I get the following error...

Run-time error '1004':

Cannot run 'SOL.EXE'. The program or one of its
components is damaged or missing

Rick
 
On my system it runs Solitaire located in:

C:\WINDOWS\system32\sol.exe

I am using WinXP
 
I'm using Vista... which apparently is the problem. It seems they moved
Solitaire to a different location in this version of windows. The
path/filename for Solitaire on my system is...

C:\Program Files\Microsoft Games\Solitaire\Solitaire.exe"

Rick
 
You have apparently found a genuine bug.

When the game was moved, Excel should have been notified.
 
Are the 0 and -1 arguments documented anywhere? I ask because I don't see
them listed in the help files. If this is undocumented behavior, I don't
think Microsoft is under any obligation to maintain them from one version of
windows to the next.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top