How to de-select a selected item in a user listbox

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15585
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

How to de-select a selected item in a user listbox

Post by ChrisGreaves »

Word 2003. User level. This is NOT a VBA question, but from a user's point of view:-

How do I, as a user, un-select an item I have selected in a GUI form list box?

The application (VBA programmer) throws up a GUI form. If as a user I select an item in the listbox, it implies that I want a specific action to be taken (e.g. if I have selected a style in a listbox of style names, I want that style applied to the current selected text).

Having clicked on a style name in the listbox, I change my mind; I decide that no, I do NOT want any extra style to be applied. I regret clicking on the item in the list box.

As a programmer I know how to clear the selection using VBA, but if no such facility has been provided, how can a poor old user remove the list box selection?

Thanks in keen anticipation ...

(signed) "Homesick" of Toronto
There's nothing heavier than an empty water bottle

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to de-select a selected item in a user listbox

Post by HansV »

If it is a standard single-select list box, there is no way for the end user to clear the selection if the programmer hasn't provided for it...
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: How to de-select a selected item in a user listbox

Post by Rudi »

I agree. Either it must be programmed in on the code controlling the user form or the user would need to cancel the form and reactivate it again.
If they are proactive, they can write to the programmer and ask for this improvement in version 2.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15585
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: How to de-select a selected item in a user listbox

Post by ChrisGreaves »

HansV wrote:If it is a standard single-select list box, there is no way for the end user to clear the selection if the programmer hasn't provided for it...
Thanks, Hans. I am relieved to hear that "it wasn't me" - the user - after hunting around the Word2003 help files (as a user).
Chris
There's nothing heavier than an empty water bottle

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15585
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: How to de-select a selected item in a user listbox

Post by ChrisGreaves »

Rudi wrote:I agree. Either it must be programmed in on the code controlling the user form or the user would need to cancel the form and reactivate it again..
Thanks Rudi.
So it seems that the ability to cancel a ListBox (combobox?) selecttioon becomes a programmer's responsibility.
It thus becomes a principle of good programming (design).

I have had applications where it makes no sense at all to continue until an item is selected.
The current application is not such an application.
If they are proactive, they can write to the programmer and ask for this improvement in version 2
Hah! The programmer is in the habit of heading off to Europe for three weeks and basically being incommunicado for three weeks or more at a time... :hairout:
There's nothing heavier than an empty water bottle

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15585
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: How to de-select a selected item in a user listbox

Post by ChrisGreaves »

ChrisGreaves wrote:How do I, as a user, un-select an item I have selected in a GUI form list box?
I knew I was having a case of deja vu when I issued an Edit-Replace in Word2003 this afternoon:
DropStyle.png
In the standard MSWord dialogue we have a special command button to release the user from the decision to invoke styles (or other formatting)
Cheers
Chris
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle