BeforeDoubleClick event in Excel 2007 VBA

I have a piece of code that needs to take action on a cell in one of a many rows in an Excel worksheet. A typical code snippet is:

   Cells(ActiveCell.Row, 8).Select

Most of the time it behaves and selects column 8 in the active row. But occasionally it will go to the last row in the used range.

Does anybody know why - and is there a cure?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zorvek (Kevin Jones)ConsultantCommented:
It's because you are double-clicking on the cell edge which Excel interprets as a command to go to the end of the non-blank cells in that row or column, depending on which side of the cell is double-clicked. Annoying as hell and I wish there was a way to turn it off.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
zorvek (Kevin Jones)ConsultantCommented:
For an illustration of this behavior, see:

Title: Do you know these Double-click Tricks in Excel?
Section: Jump to last row / column in table with double-click

Saqib Husain, SyedEngineerCommented:
>>>...double-clicking on the cell edge which Excel interprets as a command to go to the end of the non-blank cell...

WOOOW! Kevin, so many years put into Excel and I never bumped into this one. Thanks for the tip.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.