I have create a list of choices in a list box. When I grab the selected item properties I want that to trigger showing a second list box while hiding all others. There will be a rather long list.
I want to remove all spaces from the selected item text and prefix it with lb.
An example of what I am trying to do is:
I then get an error that Location is not valid for a string. How do I convert my text string into a list box name so I can set the properties on the list box?
Any assistance is greatly appreciated.
Alternatively I would love to be able to create an expanding list box if anyone can point me to how to do that.
I hope that helps.
Regards,
Mark
Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
I want to remove all spaces from the selected item text and prefix it with lb.
An example of what I am trying to do is:
Code:
Private Sub MainMenu_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainMenu.SelectedIndexChanged
Dim mmSelectedText = "lb" + Replace(MainMenu.SelectedItem, " ", "") As String
lbManagingArchiving.Visible = False
lbConfiguringSupportforClientsandDevices.Visible = False
mmSelectedText.Location = New Point(27, 205)
mmSelectedText.Visible = True
End Sub
I then get an error that Location is not valid for a string. How do I convert my text string into a list box name so I can set the properties on the list box?
Any assistance is greatly appreciated.
Alternatively I would love to be able to create an expanding list box if anyone can point me to how to do that.
I hope that helps.
Regards,
Mark
Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.