Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default prevent doubleclick for command button

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default prevent doubleclick for command button

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default prevent doubleclick for command button


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
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
Userform Command Button not available until another command buttonhas been used [email protected] Excel Programming 4 September 4th 08 04:35 PM
Deselect Command Button by Selecting another Command Button gmcnaugh[_2_] Excel Programming 3 September 2nd 08 05:59 PM
Wanting to Create A Command Button Command bumper338 Excel Programming 3 May 7th 07 06:53 PM
VB's Command Button vs Form's Command Button Ronald Dodge Excel Programming 3 May 24th 06 02:23 PM
Permit DoubleClick but prevent other editing David Powell Excel Programming 1 July 19th 03 08:50 PM


All times are GMT +1. The time now is 01:00 PM.

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

About Us

"It's about Microsoft Excel"