Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello!
I have several command buttons that has assigned macros to get a particular record and delete it. How can I ensure that double-click for the command button is disabled? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As far as I can see, if you do double-click a command button, the button's
click event is fired once only. If you don't have an event handler for double clicking, then just the click event will fire. Anyway, in answer to your question, in the VBA code window choose your command button from the object combo and then select DblClick from the procedure combo. This adds an event handler to your code. Within this sub just type :- Cancel=True -- Alan Moseley IT Consultancy http://www.amitc.co.uk If I have solved your problem, please click Yes below. Thanks. "Gina" wrote: Hello! I have several command buttons that has assigned macros to get a particular record and delete it. How can I ensure that double-click for the command button is disabled? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Try this Code: -------------------- Option Explicit Private Sub CommandButton1_DblClick(ByVal Cancel As MSForms.ReturnBoolean) Cancel = True End Sub -------------------- -- royUK Hope that helps, RoyUK For tips & examples visit my 'web site ' (http://www.excel-it.com) ------------------------------------------------------------------------ royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=34156 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Userform Command Button not available until another command buttonhas been used | Excel Programming | |||
Deselect Command Button by Selecting another Command Button | Excel Programming | |||
Wanting to Create A Command Button Command | Excel Programming | |||
VB's Command Button vs Form's Command Button | Excel Programming | |||
Permit DoubleClick but prevent other editing | Excel Programming |