Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default beforeDoubleClick (target, true)

in a beforeDoubleClick procedure, i set the cancel arguement to true which
solves some wierd select/reselect problems that i was having;

however, when the user selects another cell, i want them to be able to use a
double click to initiate in-cell editing; however the beforeDoubleClick
procedure disabled it...

how (when the user selects a different cell that the double click target) do
i get it back on?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default beforeDoubleClick (target, true)

Mark,

You have to test the Target variable to determine if it is in the
range for which you want to disable double-click. For example,
the following code will disable double-click function in the
range A1:B10, and leave it to normal behavior in all other cells.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Not Application.Intersect(Target, Range("A1:B10")) Is Nothing
Then
Cancel = True
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"mark kubicki" wrote in message
...
in a beforeDoubleClick procedure, i set the cancel arguement to

true which
solves some wierd select/reselect problems that i was having;

however, when the user selects another cell, i want them to be

able to use a
double click to initiate in-cell editing; however the

beforeDoubleClick
procedure disabled it...

how (when the user selects a different cell that the double

click target) do
i get it back on?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default beforeDoubleClick (target, true)

if the target cell is later selected by click (not a doubleclick), will the
user then be able to double click within the active cell to edit the
contents (i would want them to be able to)?


"Chip Pearson" wrote in message
...
Mark,

You have to test the Target variable to determine if it is in the
range for which you want to disable double-click. For example,
the following code will disable double-click function in the
range A1:B10, and leave it to normal behavior in all other cells.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Not Application.Intersect(Target, Range("A1:B10")) Is Nothing
Then
Cancel = True
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"mark kubicki" wrote in message
...
in a beforeDoubleClick procedure, i set the cancel arguement to

true which
solves some wierd select/reselect problems that i was having;

however, when the user selects another cell, i want them to be

able to use a
double click to initiate in-cell editing; however the

beforeDoubleClick
procedure disabled it...

how (when the user selects a different cell that the double

click target) do
i get it back on?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Target cell reference moves when target is cut and pasted Illya Teideman Excel Discussion (Misc queries) 5 May 31st 07 11:34 AM
Function to return True/False if all are validated as True by ISNU Tetsuya Oguma Excel Worksheet Functions 2 March 15th 06 10:28 AM
How do I stop Excel from changing the word true to TRUE? Schmyerlou Excel Discussion (Misc queries) 1 November 23rd 05 08:54 PM
Selective protection of charts - permit only beforedoubleclick? Jon Peltier[_5_] Excel Programming 0 January 23rd 04 11:41 PM
Selective protection of charts: permit only BeforeDoubleClick ? David Powell Excel Programming 0 July 14th 03 01:14 AM


All times are GMT +1. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"