Double Click

H

halem2

Hi:

I'm using

Application.CommandBars("Toolbar List").Enabled = False

to prevent the right click on the toolbar but if you double-click on a
empty space in the tool bar, it still shows the Customize box wit
Toolbars, Commands and Options.

Is there a wa to restrict the double-click also? thanks
 
D

Dave Peterson

Depends on the version of excel:

In xl2002+, you can do something like:

Application.CommandBars.DisableCustomize = True

Before that, you could disable _ALL_ the double clicking with something like:

Option Explicit
Sub testme()
Application.CommandBars("Toolbar list").Enabled = False
Application.CommandBars("Tools").Controls("Customize...").Enabled = False
'and if you want to stop the doubleclicking in the commandbar area
'from bringing up the customization dialog:
Application.OnDoubleClick = "donothing"
End Sub

Sub donothing()
' MsgBox "hi"
End Sub

But disabling the doubleclick kills it for everything.

To bring it back,
Application.OnDoubleClick = ""
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top