Double-Clicking a cell for Multiple Options

  • Thread starter Thread starter andym
  • Start date Start date
A

andym

I recently came across a spreadsheet where a cell was double clicked for the
multiple options to become available.

This was similar to a drop-down list, but there was no drop down list!!
Confused?

An example...

The cell currently shows a value of "A".
I double-click on this cell ... the cell changes to "B".
The new value is not random, but coming from a pick list or a pre-determined
list.

Does anybody know how such a feature is created?

Regards,

andym
 
If you rightclick on that cell and choose "Pick from DropDown List" do you get
the same effect?

If yes, maybe it was a macro that did the work:

Option Explicit

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Dim myCtrl As CommandBarControl
Set myCtrl = Nothing
On Error Resume Next
Set myCtrl = Application.CommandBars.FindControl(ID:=1966)
On Error GoTo 0

If myCtrl Is Nothing Then
Exit Sub
Else
myCtrl.Execute
End If

Cancel = true

End Sub

Rightclick on the worksheet tab, select view code and paste this in that code
window.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top