Results 1 to 4 of 4

Thread: Help with Case statements [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Addicted Member DKasler's Avatar
    Join Date
    Jan 2005
    Location
    Brooklyn, NYC
    Posts
    177

    Resolved Help with Case statements [RESOLVED]

    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:
    1. Dim Selected
    2. Dim tempArray() As String
    3.  
    4. tempArray = Split(TreeView1.SelectedItem.Text, " ") 'remove the space and store each word in an array
    5. Selected = Join(tempArray, "") 'join back together again
    6.  
    7. Select Case Selected
    8.    
    9. Case NewPatient
    10.     FrameNewPatient.visible = true
    11.    
    12. Case EditPatien
    13.     MsgBox "NO"
    14. 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.
    Last edited by DKasler; Feb 8th, 2005 at 01:34 PM. Reason: Issue Resolved
    -----MY SITES-----
    BayRidgeNights.Com - NYC Nightlife Forums

    Fight Communism - Rate Posts!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width