+ Reply to Thread
Results 1 to 16 of 16

BeforeDoubleCLick

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Portsmouth, United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    6

    BeforeDoubleCLick

    So I am a Theatre Stock Controller, for a private healthcare business, the spreadsheet i have been given is pretty ancient, so im trying to update it and make it more robust.

    Earlier today i came across the BeforeDoubleClick function and so far have managed to get it to work,however i would really appreciate if someone could explain to me how i limit this to one column of the whole spreadsheet.

    The column is used to say whether or not i have recieved the goods, i.e 10ml Syringes (double click on cell in column, Yes appears)

    any ideas?

    Thanks

    Josh BRCB

  2. #2
    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: BeforeDoubleCLick

    Put your code inside an IF statement like:

    Please Login or Register  to view this content.
    where column A is the relevant column. Change it as necessary.
    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.

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    Portsmouth, United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: BeforeDoubleCLick

    Sorry Richard, im a tad slow when it comes to excel:

    this is my current code:
    Please Login or Register  to view this content.
    this is your code:

    Please Login or Register  to view this content.
    Where do i put what? lol
    Last edited by arlu1201; 08-07-2012 at 07:12 AM.

  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: BeforeDoubleCLick

    Hi,

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-07-2012
    Location
    Portsmouth, United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: BeforeDoubleCLick

    Thank you very much richard,

    one more thing,

    what if i want it from: B3 - B30 and then i want another set of sets but it doesnt start with B31, it starts at B38?

    i promise the next message from me will be a good bye lol

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

    Re: BeforeDoubleCLick

    Josh,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    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]

  7. #7
    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: BeforeDoubleCLick

    Hi,

    Just modify the line
    If Not Intersect (Target, Range("A:A")) Is Nothing Then

    to

    If Not Intersect (Target, Range("B3:B30")) Is Nothing Then

    or if discrete ranges are involved

    If Not Intersect (Target, Range("B3:B30, B38:B48")) Is Nothing Then

    ---------- Post added at 12:27 PM ---------- Previous post was at 12:22 PM ----------

    Quote Originally Posted by arlu1201 View Post
    Josh,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    @arlette
    Must admit that I thought there was a generally unacknowledged but understood 'rule' that where just two or three lines of code were involved, strict adherence to rule 3 would not be invoked and let past.

    And I see that the recent change to the duplicate posting functionality (whereby posts on the same thread within 10 minutes are appended to a previous post) is getting in the way here and just lengthening the post - see my PM yesterday. Can we address this please?
    Last edited by Richard Buttrey; 08-07-2012 at 07:30 AM.

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

    Re: BeforeDoubleCLick

    Yes Richard. If its 1 or 2 lines, i tend to ignore it. But since it was a newbie posting it, i thought we could educate them on the rules.

    I have passed on your PM to the tech team to check the plugin.

  9. #9
    Registered User
    Join Date
    08-07-2012
    Location
    Portsmouth, United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: BeforeDoubleCLick

    Hello again

    So yesterday i managed to get all of the above done (Not much i know) however there is one more thing i want on the spreadsheet, to do with the same bit of code, so far i have it so that when i double click it says "Yes" in the particular cell, however when i double click i also want it to turn green.

    I know it would have something to do with an if statement but thats as far as my knowledge base goes, its been quite along time since i did computing at college:

    this is the code im currently working with:

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: BeforeDoubleCLick

    You sould go under Conditional Formatting and use the Format only cells that contain word "Yes" and where you have to inseret for which columns you want this to work enter "B:B"

  11. #11
    Registered User
    Join Date
    08-07-2012
    Location
    Portsmouth, United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: BeforeDoubleCLick

    do you have the code for that by any chance?

  12. #12
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: BeforeDoubleCLick

    Here is a test attachment.
    You should try typing Yes in any cell in column A.
    Then go under Conditional Formatting and check the rules what I did
    Attached Files Attached Files

  13. #13
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: BeforeDoubleCLick

    Or just use
    Please Login or Register  to view this content.
    instead of
    Please Login or Register  to view this content.
    And the sky is the limit

  14. #14
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: BeforeDoubleCLick

    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  15. #15
    Registered User
    Join Date
    08-07-2012
    Location
    Portsmouth, United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: BeforeDoubleCLick

    I cant view the code that you have used to put it in my excel document, sorry to be a pain in the ****, it works perfectly on your spreadsheet

    ---------- Post added at 05:47 AM ---------- Previous post was at 05:46 AM ----------

    Thank you JosephP, and thank you Stojko i really appreciate it, sorry for being such a dunce

  16. #16
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: BeforeDoubleCLick

    Go in the Home Tab under Style.
    Conditional Formatting.
    Manage Rules.
    Whan a windows pups up you have a dropdown windows where you pick
    Show formatting rules for: This work sheet - There is your problem why you can't see the rule.
    Then just duble click the rule to open it.

    That helped?

    Or click on Cell "A1" and go:
    Conditional Formattin
    Manage Rules
    And the Rule should be there.

    Or just do what JB wrote

+ Reply to 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