Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Problem with Selecting Items From a List Box

$
0
0

Hello

I am trying to use the code posted here http://technet.microsoft.com/en-us/library/ff730949.aspx

The problem is $x return nothing (e.g. return no output to the console and appears empty)

however if I change the following line 

$x=$objListBox.SelectedItem

to

write-host $objListBox.SelectedItem

it does return the relevent item I chose.

with the original code if I change the last line to

$X -eq $null

it returns True

I need to get the relevent string value (e.g. the item choosen) into variable X for latter comparision

Please advise

Thanks very much

Ernie


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>