by Dennis John (3 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 18th January 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Execute exe files through VB
API Declarations
Const Wordpad = "C:\program files\accessories\Wordpad.exe"
Const Paint = "c:\windows\Pbrush.exe"
Const Calculator = "c:\windows\Calc.exe"
Const Volume = "c:\windows\Sndvol32.exe"
' set its intex 0 to 4
Private Sub CmdButtons_Click(Index As Integer)
Select Case Index + 1
Case Is = 1
Shell Notepad, vbNormalNoFocus
Case Is = 2
Shell Wordpad, vbNormalNoFocus
Case Is = 3
Shell Paint, vbNormalNoFocus
Case Is = 4
Shell Calculator, vbNormalNoFocus
Case Is = 5
Shell Volume, vbNormalNoFocus
End Select
End Sub