View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Minitman Minitman is offline
external usenet poster
 
Posts: 293
Default Cancel Out of UserForm Return Focus

Hey Andy,

Thanks for the reply.

Your solution also works, with the same problem as I mentioned in my
reply to Dave. Triggering this before double click event in column A
seems to turn off the event after the first use. closing the workbook
seems to be the only way to reset that event handler.

I am really at a loss as to what is causing this effect!!!

Anyone have any ideas or thoughts as to what is happening?

Any help would be greatly appreciated.

-Minitman


On Sun, 28 Sep 2008 19:42:01 -0700, AndyM
wrote:

At the end of your Worksheet_BeforeDoubleClick event, just add a line to
select a different cell. You just want to make sure you are selecting a
different cell and not the same one that was double clicked. The following
code will select the cell 1 row above the active cell. If active cell is the
first cell, it will select the row below.

If ActiveCell.Row 1 Then
Cells(ActiveCell.Row - 1, ActiveCell.Column).Select
Else
Cells(ActiveCell.Row + 1, ActiveCell.Column).Select
End If



"Minitman" wrote:

Greetings,

I am using a Worksheet_BeforeDoubleClick event to go into a UserForm.
When I come out the focus is in the cell I double clicked on.

Is there some way to come out of the UserForm (normally or bug-out)
and not still be in that cell?

Any ideas, thoughts or suggestions would be welcome and appreciated.

-Minitman