![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
Can you turn off the dblclick event with code
and turn it back on with code? |
|
|
|
|
|
#2 | |
|
Board Regular
Join Date: Jan 2003
Posts: 297
|
I have been trying to find this out too myself with no joy as yet. I have tried the following method thinking it would be perhaps a key press even though it is the mouse ( theres Logic there somewherre trust me
BUT NO JOY... Quote:
Any ideas people ? thanks |
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,387
|
Maybe I'm totally misunderstanding the question. Does this have more to do with userforms (per subject line) or more to do with the double click event (per the question)?
One way to use code to enable and disable doubleclick is to have 2 separate macros, one tying into a third, plus a procedure in the Close event to re-enable it for the application. Three macros in a standard module: Assigned to one button: Sub DoubleClickDisable() Application.OnDoubleClick = "TurnOff" End Sub Assigned to another button: Sub DoubleClickEnable() Application.OnDoubleClick = "" End Sub Support for the DoubleClickDisable sub: Sub TurnOff() End Sub This procedure in the workbook module: Private Sub Workbook_BeforeClose(Cancel As Boolean) Call DoubleClickEnable End Sub Any help? |
|
|
|
|
|
#4 | |
|
Board Regular
Join Date: Jan 2003
Posts: 297
|
Quote:
Thanks very much indeed... May I be cheeky and ask the following too ? I am wodering if it is possible to not allow anyone to click inside / edit the formula bar. the reason I ask this is my form I have been making is to be a holiday sheet that users merely click the buttons provided and nout else to be able to edit / mess things up :0) this is the only way I can possibly see that this can be done now. |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|