PDA

View Full Version : BeforeDoubleClick Event



Cyberdude
05-09-2007, 12:43 PM
I just discovered that the "BeforeDoubleClick" event seems to be activated ONLY if I actually perform a double click.

While that may seem obvious, I have always set my computers to respond to a SINGLE click. I can't remember where I selected that option, but it apparently doesn't tell the "BeforeDoubleClick" event about my choice. Is that the way it is supposed to work?? :dunno

vonpookie
05-09-2007, 01:08 PM
Do you want Worksheet_SelectionChange, perhaps? That fires whenever you change the selection on the sheet.

Edit: Though now that I read this again...

I have always set my computers to respond to a SINGLE click. Do you mean the settings in Windows? There is a setting in Windows where you can set it to run things on single click or the "classic" way of double-click. If this *is* what you are referring to, then no, your selection in Windows doesn't affect anything in Excel.

lucas
05-09-2007, 03:46 PM
Edit: I may have been a little too sarcastic
You're killin me Sid
Depends on what the object is.....Button, listbox have click event:
Private Sub ListBox1_Click()
and doubleclick event for listbox....
sheets have doubleclick event and...beforerightclick event. etc.
.....................

Cyberdude
05-10-2007, 05:05 PM
To VonPookie: Yes, I did the change from doubleclick to single click via one of the folder options in Windows. I assumed that Excel would recognize that change, but I guess not.

I had a very simple task: on a worksheet, when I single-clicked a cell, I wanted that cell to immediately change interior color. I would have filtering logic so that this effect would occur only on certain cells. It works IF I double-click the cell, but not if I single-click it. This is just some fluff logic I thought I'd use, but if it doesn't work, no one cares. I thought I'd check with the crew to see if I was failing to do something. I just wanted to extend my education. Thanks for the reply.

To Lucas: Not sure what you are referring to, guy. I didn't see anything from you that looked sarcastic. As for killing you, I'm not sure what that refers to, but let me assure you that was never my intent.

Thanks to both of you for the replies.
Sid

vonpookie
05-10-2007, 06:56 PM
I had a very simple task: on a worksheet, when I single-clicked a cell, I wanted that cell to immediately change interior color. I would have filtering logic so that this effect would occur only on certain cells. It works IF I double-click the cell, but not if I single-click it.

Yeah, Before_DoubleClick does just that--when you double-click it runs the code *before* the cell is activated for editing (which is the default double-click action).

You can find more information in the VBA help files. Look for the SelectionChange event.

lucas
05-10-2007, 07:18 PM
Ignore me Sid, I must have been drinking that night.....footinmout