I am trying to dbl_click on a Treeview and have it work kind of like a menu, Its doing what its supposed to upto the Case statement.
My thought was to use the case statment to do things like open forms, etc... but it doesnt seem to work as I thought.
Is this an inappropriate use of Case? or am I just not coding it correctly?
VB Code:
Dim Selected Dim tempArray() As String tempArray = Split(TreeView1.SelectedItem.Text, " ") 'remove the space and store each word in an array Selected = Join(tempArray, "") 'join back together again Select Case Selected Case NewPatient FrameNewPatient.visible = true Case EditPatien MsgBox "NO" End Sub
What I thought was that since Select Case is selecting my Selected variable
Then of the Selected happens to be = to NewPatient
that Case NewPatient would be triggerd and the code under it.




Reply With Quote