Closed Thread
Results 1 to 7 of 7

Double Click Button

  1. #1
    Registered User
    Join Date
    06-02-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    3

    Double Click Button

    Hey folks! Thanks in advance for any help. I'm a beginning Excel user and teacher looking to create a self-grading mouse test for my computer lab students. I just need to be able to have text appear on double clicking a button. I had no problem doing the single click button. I just need a little help changing the activation setting to double click. Here's how what I need to do looks like without the Double Click:

    Sub Macro3()
    Range("E21").Select
    ActiveCell.FormulaR1C1 = "Correct!"
    End Sub

    Super easy, but stumped me with only the help files to work from. I'd also love any explanations of the concepts involved so I can repeat this process in similar situations. Thanks again.

  2. #2
    Forum Contributor
    Join Date
    07-01-2008
    Location
    Cincinnati, OH
    Posts
    150

    Re: Double Click Button

    I suppose that you are creating your button from the Forms commandbar? Create an activeX commandbutton from the Control Toolbox and you will have an easier go of it in this case.

    Private Sub CommandButton1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

    This is a native event that is waiting for you to use it.

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208

    Re: Double Click Button

    Here is another option fo ryou. If you want the cell you are double-clicking to say "Correct!" by double-clicking on it, try this:

    - right-click on the sheet tab and select view code
    - copy the following code to the VBA window:

    Please Login or Register  to view this content.
    HTH,
    Jason

  4. #4
    Registered User
    Join Date
    06-02-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Double Click Button

    Thanks for both suggestions. The Active X route is the way I think I'll go. I want the button to remain saying 'Double Click Here!' while the cell immediately to the right displays correct or maybe a smiley.

    I didn't try Active X before. I had encountered that code in the help file but didn't connect it to Active X. I knew there had to be a more 'native' way to do it. I should be good now. I'll report back with results.

  5. #5
    Registered User
    Join Date
    06-02-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Double Click Button

    Thanks again! The Active X button worked out great! I haven't used the Control Toolbox Toolbar at all yet. It was a good little adventure. Once I figured out how to toggle design mode, it was super easy as promised.

    I teach in a computer lab that pulls students from various Adult Education classes (ESL and GED). This little button will be part of a self-grading mousing and typing test that will condense two separate documents used each twice a semester each 12 weeks with 150-200 students. Each year that's 4 x 2 x 175 tests I don't need to grade or print out hard copies for. This will save me hours and hours of work. The bonus for studens is instant feedback about the correctness of their actions. They will KNOW when they have it right. This makes them much more determined and dramatically improves their engagement and retention. Your little help goes a long way.

    One more super thanks!

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Double Click Button

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Double Click Button

    Your thread is being closed for non compliance with our rules. Please PM me when you have read the forum rules RULES and made the changes to your post accordingly, i will then unlock your post so you may continue with the thread!

    Post Closed

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1