|
|
 |
Re: FN-FORUM: Listbox question
date posted 14th March 2008 17:19
I think this is how you deselect ListBox items.
Sub Clear_Form(ByVal Sender As Object, ByVal E As EventArgs)
Details.Text = ""
From_Hour.SelectedIndex = -1
From_Minute.SelectedIndex = -1
To_Hour.SelectedIndex = -1
To_Minute.SelectedIndex = -1
End Sub
The error message probably comes from the fact that there is an item
selected and
From_Hour.items(0).selected = "True"
selects a second - the first item in the list.
----- Original Message -----
From: [EMAIL REMOVED] [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Friday, March 14, 2008 5:23 PM
Subject: FN-FORUM: Listbox question
>
> Whys am I getting "Cannot have multiple items selected when the
> SelectionMode is Single." When I clear the form using
>
>
>
> Sub Clear_Form(ByVal Sender As Object, ByVal E As EventArgs)
> Details.Text = ""
> From_Hour.items(0).selected = "True"
> From_Minute.items(0).selected = "True"
> To_Hour.items(0).selected = "True"
> To_Minute.items(0).selected = "True"
> End Sub
>
>
>
>
>
>
> This is the list boxes
>
>
>
>
>
>
>
>
>
>
>
>
> runat="server" ToolTip="From what hour?">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> runat="server" ToolTip="From what minute?">
>
>
>
>
>
>
>
>
>
>
>
>
>
> runat="server"
> ToolTip="To what hour?">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> runat="server" ToolTip="From what minute?">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Thanks
> Pam,
>
>
>
>
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>
> To advertise here: http://www.freelancers.net/advertising.html
>
> |
 |
|