ant
May 29th, 2001, 03:13 PM
Take alook at this code first:
' This code is supposed to, when you select an item and click show, it should open calculator
' if you click calculator
Dim run as string
private Sub show_Click()
If List1.text = "Word Processor" then
Form2.Show
ElseIf List1.text = "Calculator" then
run = Shell("C:\WINDOWS\CALC.EXE", 1)
End If
End Sub
' That works
' This code is supposed to exit the program when you click on calculator
private Sub close_Click()
If List1.text = "Word Processor" then
Form2.Hide
ElseIf List1.text = "Calculator" then
End If
End Sub
' And then there's the rest
private Sub Exit_Click()
End
End Sub
private Sub Form_Load()
List1.AddItem "Word Processor"
List1.AddItem "Calculator"
End Sub
' My question is: how do you make it close calculator when you select it from the list box and 'click close?
--Ant
' This code is supposed to, when you select an item and click show, it should open calculator
' if you click calculator
Dim run as string
private Sub show_Click()
If List1.text = "Word Processor" then
Form2.Show
ElseIf List1.text = "Calculator" then
run = Shell("C:\WINDOWS\CALC.EXE", 1)
End If
End Sub
' That works
' This code is supposed to exit the program when you click on calculator
private Sub close_Click()
If List1.text = "Word Processor" then
Form2.Hide
ElseIf List1.text = "Calculator" then
End If
End Sub
' And then there's the rest
private Sub Exit_Click()
End
End Sub
private Sub Form_Load()
List1.AddItem "Word Processor"
List1.AddItem "Calculator"
End Sub
' My question is: how do you make it close calculator when you select it from the list box and 'click close?
--Ant