+ Reply to Thread
Results 1 to 9 of 9

Thread: Run Macro on Mouse Click

  1. #1
    vacation
    Guest

    Run Macro on Mouse Click

    Is is possible to run a macro that displays a pre-set number upon clicking in
    a cell?
    For example: everytime someone needs to see the value 24 in cell b4 all they
    have to do is click in that cell to make that number visible.
    Thank you

  2. #2
    Richard Buttrey
    Guest

    Re: Run Macro on Mouse Click

    On Thu, 13 Jul 2006 10:58:02 -0700, vacation
    <vacation@discussions.microsoft.com> wrote:

    >Is is possible to run a macro that displays a pre-set number upon clicking in
    >a cell?
    >For example: everytime someone needs to see the value 24 in cell b4 all they
    >have to do is click in that cell to make that number visible.
    >Thank you


    The following in the Worksheet Selection Change event should do the
    trick


    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Intersect(Target, Range("B4")) Is Nothing Then Range("B4")
    ="24"

    End Sub

    HTH

    __
    Richard Buttrey
    Grappenhall, Cheshire, UK
    __________________________

  3. #3
    vacation
    Guest

    Re: Run Macro on Mouse Click

    Thank you! I appreciate it!

    "Richard Buttrey" wrote:

    > On Thu, 13 Jul 2006 10:58:02 -0700, vacation
    > <vacation@discussions.microsoft.com> wrote:
    >
    > >Is is possible to run a macro that displays a pre-set number upon clicking in
    > >a cell?
    > >For example: everytime someone needs to see the value 24 in cell b4 all they
    > >have to do is click in that cell to make that number visible.
    > >Thank you

    >
    > The following in the Worksheet Selection Change event should do the
    > trick
    >
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > If Not Intersect(Target, Range("B4")) Is Nothing Then Range("B4")
    > ="24"
    >
    > End Sub
    >
    > HTH
    >
    > __
    > Richard Buttrey
    > Grappenhall, Cheshire, UK
    > __________________________
    >


  4. #4
    vacation
    Guest

    Re: Run Macro on Mouse Click

    I am working in Excel version 2000. Is Worksheet Selection Change event in
    there?

    "Richard Buttrey" wrote:

    > On Thu, 13 Jul 2006 10:58:02 -0700, vacation
    > <vacation@discussions.microsoft.com> wrote:
    >
    > >Is is possible to run a macro that displays a pre-set number upon clicking in
    > >a cell?
    > >For example: everytime someone needs to see the value 24 in cell b4 all they
    > >have to do is click in that cell to make that number visible.
    > >Thank you

    >
    > The following in the Worksheet Selection Change event should do the
    > trick
    >
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > If Not Intersect(Target, Range("B4")) Is Nothing Then Range("B4")
    > ="24"
    >
    > End Sub
    >
    > HTH
    >
    > __
    > Richard Buttrey
    > Grappenhall, Cheshire, UK
    > __________________________
    >


  5. #5
    Bob Phillips
    Guest

    Re: Run Macro on Mouse Click

    It's in all Excel since Excel 97.

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "vacation" <vacation@discussions.microsoft.com> wrote in message
    news:AB2E9E8A-80E9-486F-9D5C-0FA7B7CE8100@microsoft.com...
    > I am working in Excel version 2000. Is Worksheet Selection Change event in
    > there?
    >
    > "Richard Buttrey" wrote:
    >
    > > On Thu, 13 Jul 2006 10:58:02 -0700, vacation
    > > <vacation@discussions.microsoft.com> wrote:
    > >
    > > >Is is possible to run a macro that displays a pre-set number upon

    clicking in
    > > >a cell?
    > > >For example: everytime someone needs to see the value 24 in cell b4 all

    they
    > > >have to do is click in that cell to make that number visible.
    > > >Thank you

    > >
    > > The following in the Worksheet Selection Change event should do the
    > > trick
    > >
    > >
    > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > > If Not Intersect(Target, Range("B4")) Is Nothing Then Range("B4")
    > > ="24"
    > >
    > > End Sub
    > >
    > > HTH
    > >
    > > __
    > > Richard Buttrey
    > > Grappenhall, Cheshire, UK
    > > __________________________
    > >




  6. #6
    vacation
    Guest

    Re: Run Macro on Mouse Click

    Thanks

    "Bob Phillips" wrote:

    > It's in all Excel since Excel 97.
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (replace somewhere in email address with gmail if mailing direct)
    >
    > "vacation" <vacation@discussions.microsoft.com> wrote in message
    > news:AB2E9E8A-80E9-486F-9D5C-0FA7B7CE8100@microsoft.com...
    > > I am working in Excel version 2000. Is Worksheet Selection Change event in
    > > there?
    > >
    > > "Richard Buttrey" wrote:
    > >
    > > > On Thu, 13 Jul 2006 10:58:02 -0700, vacation
    > > > <vacation@discussions.microsoft.com> wrote:
    > > >
    > > > >Is is possible to run a macro that displays a pre-set number upon

    > clicking in
    > > > >a cell?
    > > > >For example: everytime someone needs to see the value 24 in cell b4 all

    > they
    > > > >have to do is click in that cell to make that number visible.
    > > > >Thank you
    > > >
    > > > The following in the Worksheet Selection Change event should do the
    > > > trick
    > > >
    > > >
    > > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > > > If Not Intersect(Target, Range("B4")) Is Nothing Then Range("B4")
    > > > ="24"
    > > >
    > > > End Sub
    > > >
    > > > HTH
    > > >
    > > > __
    > > > Richard Buttrey
    > > > Grappenhall, Cheshire, UK
    > > > __________________________
    > > >

    >
    >
    >


  7. #7
    vacation
    Guest

    Re: Run Macro on Mouse Click

    I have been searching in Excel to find this function for words like it in the
    function drop down lists. Do you know where it is? When used help I found
    worksheet_function but not worksheet_selection change.

    "Bob Phillips" wrote:

    > It's in all Excel since Excel 97.
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (replace somewhere in email address with gmail if mailing direct)
    >
    > "vacation" <vacation@discussions.microsoft.com> wrote in message
    > news:AB2E9E8A-80E9-486F-9D5C-0FA7B7CE8100@microsoft.com...
    > > I am working in Excel version 2000. Is Worksheet Selection Change event in
    > > there?
    > >
    > > "Richard Buttrey" wrote:
    > >
    > > > On Thu, 13 Jul 2006 10:58:02 -0700, vacation
    > > > <vacation@discussions.microsoft.com> wrote:
    > > >
    > > > >Is is possible to run a macro that displays a pre-set number upon

    > clicking in
    > > > >a cell?
    > > > >For example: everytime someone needs to see the value 24 in cell b4 all

    > they
    > > > >have to do is click in that cell to make that number visible.
    > > > >Thank you
    > > >
    > > > The following in the Worksheet Selection Change event should do the
    > > > trick
    > > >
    > > >
    > > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > > > If Not Intersect(Target, Range("B4")) Is Nothing Then Range("B4")
    > > > ="24"
    > > >
    > > > End Sub
    > > >
    > > > HTH
    > > >
    > > > __
    > > > Richard Buttrey
    > > > Grappenhall, Cheshire, UK
    > > > __________________________
    > > >

    >
    >
    >


  8. #8
    Bob Phillips
    Guest

    Re: Run Macro on Mouse Click

    Just lookup SelectionChange

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "vacation" <vacation@discussions.microsoft.com> wrote in message
    news:4AA9BFCA-EF33-475D-BC38-B7287E750BBE@microsoft.com...
    > I have been searching in Excel to find this function for words like it in

    the
    > function drop down lists. Do you know where it is? When used help I found
    > worksheet_function but not worksheet_selection change.
    >
    > "Bob Phillips" wrote:
    >
    > > It's in all Excel since Excel 97.
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > (replace somewhere in email address with gmail if mailing direct)
    > >
    > > "vacation" <vacation@discussions.microsoft.com> wrote in message
    > > news:AB2E9E8A-80E9-486F-9D5C-0FA7B7CE8100@microsoft.com...
    > > > I am working in Excel version 2000. Is Worksheet Selection Change

    event in
    > > > there?
    > > >
    > > > "Richard Buttrey" wrote:
    > > >
    > > > > On Thu, 13 Jul 2006 10:58:02 -0700, vacation
    > > > > <vacation@discussions.microsoft.com> wrote:
    > > > >
    > > > > >Is is possible to run a macro that displays a pre-set number upon

    > > clicking in
    > > > > >a cell?
    > > > > >For example: everytime someone needs to see the value 24 in cell b4

    all
    > > they
    > > > > >have to do is click in that cell to make that number visible.
    > > > > >Thank you
    > > > >
    > > > > The following in the Worksheet Selection Change event should do the
    > > > > trick
    > > > >
    > > > >
    > > > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > > > > If Not Intersect(Target, Range("B4")) Is Nothing Then Range("B4")
    > > > > ="24"
    > > > >
    > > > > End Sub
    > > > >
    > > > > HTH
    > > > >
    > > > > __
    > > > > Richard Buttrey
    > > > > Grappenhall, Cheshire, UK
    > > > > __________________________
    > > > >

    > >
    > >
    > >




  9. #9
    vacation
    Guest

    Re: Run Macro on Mouse Click

    Tried that and other variations but it was not found in Excel help. Any other
    ideas? SelectionChange is not in my help index. Are we positive its in Excel
    2000 or maybe its in Excel 2000 but under another term?

    "Bob Phillips" wrote:

    > Just lookup SelectionChange
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (replace somewhere in email address with gmail if mailing direct)
    >
    > "vacation" <vacation@discussions.microsoft.com> wrote in message
    > news:4AA9BFCA-EF33-475D-BC38-B7287E750BBE@microsoft.com...
    > > I have been searching in Excel to find this function for words like it in

    > the
    > > function drop down lists. Do you know where it is? When used help I found
    > > worksheet_function but not worksheet_selection change.
    > >
    > > "Bob Phillips" wrote:
    > >
    > > > It's in all Excel since Excel 97.
    > > >
    > > > --
    > > > HTH
    > > >
    > > > Bob Phillips
    > > >
    > > > (replace somewhere in email address with gmail if mailing direct)
    > > >
    > > > "vacation" <vacation@discussions.microsoft.com> wrote in message
    > > > news:AB2E9E8A-80E9-486F-9D5C-0FA7B7CE8100@microsoft.com...
    > > > > I am working in Excel version 2000. Is Worksheet Selection Change

    > event in
    > > > > there?
    > > > >
    > > > > "Richard Buttrey" wrote:
    > > > >
    > > > > > On Thu, 13 Jul 2006 10:58:02 -0700, vacation
    > > > > > <vacation@discussions.microsoft.com> wrote:
    > > > > >
    > > > > > >Is is possible to run a macro that displays a pre-set number upon
    > > > clicking in
    > > > > > >a cell?
    > > > > > >For example: everytime someone needs to see the value 24 in cell b4

    > all
    > > > they
    > > > > > >have to do is click in that cell to make that number visible.
    > > > > > >Thank you
    > > > > >
    > > > > > The following in the Worksheet Selection Change event should do the
    > > > > > trick
    > > > > >
    > > > > >
    > > > > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > > > > > If Not Intersect(Target, Range("B4")) Is Nothing Then Range("B4")
    > > > > > ="24"
    > > > > >
    > > > > > End Sub
    > > > > >
    > > > > > HTH
    > > > > >
    > > > > > __
    > > > > > Richard Buttrey
    > > > > > Grappenhall, Cheshire, UK
    > > > > > __________________________
    > > > > >
    > > >
    > > >
    > > >

    >
    >
    >


+ 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.2.0