Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Drop down list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Don - 23 Jun 2007 01:39 GMT
I created a drop down list using the data, validation menu. It works well.
However, I only have two items in the list and I am wondering if there is a
better way to alternate between them. With the drop down list it takes a
couple of clicks. First you select the cell, then you click to drop down the
list, then you highlight the item, then you click on it.

Is there a way to select the alternate item with fewer clicks?
Earl Kiosterud - 23 Jun 2007 02:56 GMT
Don,

You need only click the cell, click the dropdown button, then click the desired item.  Three
clicks.

This event-fired sub will alternate between "Choice a" and Choice b" with one double-click.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Const a = "Choice a"
Const b = "Choice b"
If Not Intersect(Target, Range("H1:H4")) Is Nothing Then
 If LCase(Target.Value) = LCase(a) Then
   Target.Value = b
   ElseIf LCase(Target.Value) = LCase(b) Then
   Target.Value = a
   End If
   Cancel = True
 End If
End Sub

Just paste it from here into the sheet module.  Change the range as desired for the cells
applicable.  And the "choices".  You don't need the Data - Validation.
Signature

Earl Kiosterud
www.smokeylake.com

   Note: Top-posting has been the norm here.
   Some folks prefer bottom-posting.
   But if you bottom-post to a reply that's
   already top-posted, the thread gets messy.
   When in Rome...
-----------------------------------------------------------------------

>I created a drop down list using the data, validation menu. It works well. However, I only
>have two items in the list and I am wondering if there is a better way to alternate between
>them. With the drop down list it takes a couple of clicks. First you select the cell, then
>you click to drop down the list, then you highlight the item, then you click on it.
>
> Is there a way to select the alternate item with fewer clicks?
Don - 25 Jun 2007 00:55 GMT
Thanks,

I'm trying to make it work now.

Don

> Don,
>
[quoted text clipped - 28 lines]
>>
>> Is there a way to select the alternate item with fewer clicks?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.