+ Reply to Thread
Results 1 to 6 of 6

Run some code on a left click

  1. #1
    cdb
    Guest

    Run some code on a left click

    I have some code that I have managed to get to run when you right click in a
    certain range of cells using the Worksheet_BeforeRightClick option. Is there
    anyway of getting some code to work in the same range when there is a left
    click??

  2. #2
    Harald Staff
    Guest

    Re: Run some code on a left click

    Not that I know of, leftclick is used by the worksheet itself to decide
    where you want to go to.
    You could put a transparent object from the drawing toolbar over the range
    and assign the code to it perhaps ? I do that a lot.

    HTH. Best wishes Harald

    "cdb" <[email protected]> skrev i melding
    news:[email protected]...
    > I have some code that I have managed to get to run when you right click in

    a
    > certain range of cells using the Worksheet_BeforeRightClick option. Is

    there
    > anyway of getting some code to work in the same range when there is a left
    > click??




  3. #3
    Bob
    Guest

    RE: Run some code on a left click

    How about using BeforeDoubleClick? This would run your code every time the
    left mouse button is double clicked.

    "cdb" wrote:

    > I have some code that I have managed to get to run when you right click in a
    > certain range of cells using the Worksheet_BeforeRightClick option. Is there
    > anyway of getting some code to work in the same range when there is a left
    > click??


  4. #4
    cdb
    Guest

    RE: Run some code on a left click

    I think that's the way I'll have to go - got so caught up in trying to do it
    with one click I forgot all about that!!

    "Bob" wrote:

    > How about using BeforeDoubleClick? This would run your code every time the
    > left mouse button is double clicked.
    >
    > "cdb" wrote:
    >
    > > I have some code that I have managed to get to run when you right click in a
    > > certain range of cells using the Worksheet_BeforeRightClick option. Is there
    > > anyway of getting some code to work in the same range when there is a left
    > > click??


  5. #5
    cdb
    Guest

    Re: Run some code on a left click

    Cheers for the suggestion

    "Harald Staff" wrote:

    > Not that I know of, leftclick is used by the worksheet itself to decide
    > where you want to go to.
    > You could put a transparent object from the drawing toolbar over the range
    > and assign the code to it perhaps ? I do that a lot.
    >
    > HTH. Best wishes Harald
    >
    > "cdb" <[email protected]> skrev i melding
    > news:[email protected]...
    > > I have some code that I have managed to get to run when you right click in

    > a
    > > certain range of cells using the Worksheet_BeforeRightClick option. Is

    > there
    > > anyway of getting some code to work in the same range when there is a left
    > > click??

    >
    >
    >


  6. #6
    Mark Schreiber
    Guest

    RE: Run some code on a left click

    I would be interested in how you set up code to run on the right click event
    when a certain range is activated. I am trying to set up a spreadsheet so
    that when any of a particular group of cells is activated, the contents and
    formatting of that cell change. Basically, toggling back and forth between
    TRUE and FALSE like a check box. However, because the spreadsheet is very
    wide, I am using Group & Outline to condense it. When I tried to do this
    using standard check boxes, I found that the check boxes do not stick in
    place in the cells where I put them, when I collapse the group. So am trying
    to make the actual cell do the job. Any ideas?

    Mark Schreiber

    "cdb" wrote:

    > I think that's the way I'll have to go - got so caught up in trying to do it
    > with one click I forgot all about that!!
    >
    > "Bob" wrote:
    >
    > > How about using BeforeDoubleClick? This would run your code every time the
    > > left mouse button is double clicked.
    > >
    > > "cdb" wrote:
    > >
    > > > I have some code that I have managed to get to run when you right click in a
    > > > certain range of cells using the Worksheet_BeforeRightClick option. Is there
    > > > anyway of getting some code to work in the same range when there is a left
    > > > click??


+ 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