I have a coworker who is hopelessly addicted to mine sweeper, and everyone knows it. Our process control software allows VB scripts to be linked to different control icons. As a subtle joke, I want to make mine sweeper pop up when she clicks on the controller graphic. I have opened other office applications from VBA before and figured that would be a good model to start with. Here is what I tried:
But this doesn't seem work. Any ideas on how to open a non-office application? Again this is VBScript (which I am not as familiar with), but I'm testing it in VBA (hence the use of a msgbox).
-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
Code:
Sub OpenMinesweeper()
Dim objApp
On Error Resume Next
Set objApp = GetObject(, "Minesweeper.Application")
If objApp Is Nothing Then
Set objApp = CreateObject("Minesweeper.Application")
End If
If objApp Is Nothing Then
MsgBox prompt:="Unable to open application.", Buttons:=vbExclamation + vbOKOnly + vbApplicationModal
Exit Sub
End If
On Error GoTo 0
End Sub
But this doesn't seem work. Any ideas on how to open a non-office application? Again this is VBScript (which I am not as familiar with), but I'm testing it in VBA (hence the use of a msgbox).
-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]