+ Reply to Thread
Results 1 to 26 of 26

Double Click to add/remove Tick

  1. #1
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Double Click to add/remove Tick

    A simple method to add a tick to a cell instead of using controls. Double click to add tick and double click to remove tick.
    Please Login or Register  to view this content.
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Double Click to add/remove Tick

    Hey Smuzoen.
    Would you also not need something like this in the code?
    Of coarse you would need to replace the font with what ever your PC is using.

    Please Login or Register  to view this content.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Double Click to add/remove Tick

    No. I have used if for example in a column to mark a row rather than having stacks of form controls and then coding each of the controls e.g checkbox. Place it in a worksheet and see how it works. The idea is to double click to place a tick and double click again to remove. It is easier then to find value of cell than coding a control testing it for true/false. Hope that makes sense.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Double Click to add/remove Tick

    Hi,

    I still think JapanDave makes a valid point since if anything else happens to be entered in a column F cell which has previously been ticked and unticked there will be an unusual character.

    JD's addition is a useful addition in what I assume is meant to be a generalised macro for others rather than being specific just for you.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Double Click to add/remove Tick

    I see your point however the code it is only for a set range and not all of Column F which would be designated as requiring a tick or not a tick. If you want to allow the user to enter data into that range then I would use JD's suggestion however if you require a Tick or No Tick then I would not use the change otherwise users will be able to enter data. The reason I find it useful is that it saves having a stack of checkbox controls which need to be coded.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Double Click to add/remove Tick

    Yes, love this method and was first introduced to it here

    Example workbook attached at this site.
    HTH
    Regards, Jeff

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Double Click to add/remove Tick

    remarkable coincidence that it's nearly the same as this
    Please Login or Register  to view this content.
    that i first saw at ozgrid
    http://www.ozgrid.com/VBA/excel-checkbox-tick-cell.htm
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Double Click to add/remove Tick

    Hi,
    I'm a little late to this thread but I wrote something like this a long time ago. Find it attached. I believe you can change the "x" to any character you like.

    Now that I read my own code, I see I didn't know "Intersect" back in March 2011.
    Attached Files Attached Files
    Last edited by MarvinP; 07-21-2012 at 12:11 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  9. #9
    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 to add/remove Tick

    There's been variations of this posted fo years. I have used WingDings & Marlett.
    Attached Files Attached Files
    Hope that helps.

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

    Free DataBaseForm example

  10. #10
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Double Click to add/remove Tick

    I humbly apologise - In the rules for the submitted tips it did not say the work had to be original - I was just submitting tips that I have come across that I have found useful in my day to day use of VBA - In retrospect I should have given credit to where I found the code but to tell you the truth I cannot remember where I came across this code all I know is I saved the file in December 2010. I file away anything I find useful in a folder and I went through that folder looking at what I had accumulated over time and I thought this was a pretty cool trick. In retrospect I should have said this is not my work it is just some code I had come across in my travels.
    I am sorry if I mislead anyone .... it was never my intention to submit this implying it is original work so I apologise if I have offended anyone.
    I like most of you I am sure, hate cut and paste coders and I do not regard myself as such however I will use tried and true techniques that others have developed like we all do when extending classes.
    I am more than happy for this thread to be removed if you see fit. I do not want my reputation tarnished. Again my humble apologies.
    Last edited by smuzoen; 07-21-2012 at 11:12 PM.

  11. #11
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Double Click to add/remove Tick

    I don't think you need to apologize because it was discussed early on that the competition was not for 'novel' ideas but rather what anyone thought was a cool or neat trick. In the thread I submitted, I tried to provide links where I knew they existed but even the only 'novel' idea that came to my mind (last tip) I duly noted that someone else might have thought of this previously. It doesn't mean that's not a neat twist to a common excel function. We're all here to share ideas and there should be no penalties for that.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  12. #12
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Double Click to add/remove Tick

    @ Anthony

    I echo abousetta's comments.

    No apology is necessary. The rules make no mention of tips needing to be original, and quite rightly too.

  13. #13
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Double Click to add/remove Tick

    In respect to the last comments, agreed, and my post was only because there is a workbook for download which can be beneficial to the VBA newcomer.

  14. #14
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Double Click to add/remove Tick

    @Jeff - I had no problems with comments such as yours. There was one comment however that I thought was completely unwarranted. If we are to be a altruistic community which I have always found Excel Forum to be then I think we can do without the sarcasm.

  15. #15
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Double Click to add/remove Tick

    ...and now we know how this really wasn't a great idea.. this competition.... why not just make it a place where people can post tips and tricks that others may find useful... why make it a "competition". Nothing ever seems to go right here, does it?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  16. #16
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Double Click to add/remove Tick

    Quote Originally Posted by NBVC View Post
    ...and now we know how this really wasn't a great idea.. this competition.... why not just make it a place where people can post tips and tricks that others may find useful... why make it a "competition". Nothing ever seems to go right here, does it?
    ...or even a place where before the ink is hardly dry on the first postings there aren't any sour grapes negative comments.

  17. #17
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Double Click to add/remove Tick

    I post on a few forums but now I mainly post here as I found the ego's on the other sites too much to bear, was sick of being over posted with overly complicated solutions that did nothing to educate the OP's and the general tone of the OP's was not very thankful. I must admit in all fairness the regulars are much friendlier here and the OP's tend to be more thankful. No matter which forum you talk about there is always going to be a few that have a perpetual stick stuck (..somewhere) however on the whole I have found the regulars here that post solutions to have much less of an ego than compared to some other sites. On the whole I find Excel Forum a friendly place. I just wish that some contributors would keep their egos in check. Helping people out I think is an altruistic exercise, not one to display prowess and build egos however I guess some of us have different reasons for posting solutions.
    With respect to the competition, I must admit this experience does not encourage me to contribute again if I am going to be accused of plagiarism and cut and paste coding. That is not sour grapes, it is simply that I do not want to get into confrontational situations where I have to explain myself. I do this because I enjoy coding, I see this as my volunteer work and my reasons are as I said purely altruistic. Finally I also get to learn from some really great people. Hardly a day goes by where I do not learn something new from you guys.
    For those of you that know everything you in fact know nothing.

  18. #18
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Double Click to add/remove Tick

    to be fair,it's not you that's being criticised. it's just this whole competition idea is a farce. there are many solutions to things that maybe i/you and others take for granted,but seem a brilliant revelation to others. I learn things all the time and this bit of code is quite useful.but imo it boils down to "have you seen this before? " and to be realistic most of us have. It doesn't make it an invalid tip and it's good to remind people it exists or introduce people to it. see my post
    http://www.excelforum.com/july-compe...lls-trick.html
    there you go a blinding tip but i bet you knew it already
    Last edited by martindwilson; 07-26-2012 at 07:53 PM.

  19. #19
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Double Click to add/remove Tick

    Hi Martin
    I see you point - I guess I was not aiming at the right audience. However there is always the inherent problem with forums/emails/SMS and that the intended tone of the author and the tone interpreted by the reader may be quite different. When you said
    remarkable coincidence that it's nearly the same as this
    I interpreted this as a dig at my integrity that I just Googled for something to enter into the competition. I have pretty thick skin but two things I value above all else is my integrity and my reputation.
    I think what may be worthwhile is creating a Categorised Tip List - this could have different lists with code pertinent to the category - perhaps this could reduce recurring questions like "How do I merge all worksheets into one sheet" - we all know that the same questions get asked over and over and if people were encouraged to search the forums I would guess that 6/10 questions could be answered by OP's themselves if they just took the time to search. After all OP's learn nothing if they are spoon fed.
    Anyway I think this is the last comment I am going to make in this thread as perhaps this is something that would be best discussed around the Water Cooler. No hard feelings.

  20. #20
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Double Click to add/remove Tick

    I think the idea of competitions are not bad, but need to be more structured. Rather than, give me "the best you got", and we will wade through the salad of responses there should be a target. For example I have seen competitions asking people to provide the best solutions for a specific situation. For example:

    1) Using only formulas and graphs, create a dashboard that uses powerpivot and Excel's built-in functions for data being streamed live from xyz.com

    2) Using vba only, create a game in Excel

    etc.

    Something creative, not easily unearthed with a Google search. That way, it will test the minds and abilities of the pros who contribute here and give us less knowledgeable people inspiration on the power behind Excel and ideas for incorporation.

  21. #21
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Double Click to add/remove Tick

    Adding to Smuzoen's tip, I've collected "Checkbox" ideas over the years in a single workbook.

    Sheet 1 uses VBA and symbol font
    Sheet2 uses VBA and marlett
    Sheet3 is VBA driven mutually exclusive checkboxes
    Sheet4 uses no VBA and will put a check no matter what you enter
    Sheet5 talks briefly about Form and activeX checkboxes

    I may have modified some of it and added my comments but all the info was from this forum.
    Enjoy.
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  22. #22
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Double Click to add/remove Tick

    Quote Originally Posted by abousetta View Post
    I think the idea of competitions are not bad, but need to be more structured. Rather than, give me "the best you got", and we will wade through the salad of responses there should be a target.
    What an excellent idea.

    Arlette, Vai - are you up for this for the August competition? Time is short but this seems a much more useful approach.

  23. #23
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Double Click to add/remove Tick

    Richard,

    I had mentioned in the guidelines for the competition that for the month of July, we were not providing any topic for the tips.

    But for the next month, there would be a specific topic given.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  24. #24
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Double Click to add/remove Tick

    I think abousetta's point is that not that a topic be prescribed, but rather a specific task.

    Subtle difference maybe but extremely important. A topic is too wide ranging, a task focuses the mind.

    Regards

  25. #25
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Double Click to add/remove Tick

    Yes surely Richard. I get your point absolutely.

    Lets see what best we can do in the short time we have.

  26. #26
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Double Click to add/remove Tick

    Arlette,

    Rather than a competition every month, why not space them every 2 months or every quarter? That will give you time to wrap up things on the previous competition and prepare properly for the next one.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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