+ Reply to Thread
Results 1 to 3 of 3

How to run a procedure on entering a specific cell?

  1. #1
    SmoothFlyer@gmail.com
    Guest

    How to run a procedure on entering a specific cell?

    How to run a procedure on entering a specific cell?

    I am trying to pop up a calendar control to enter a date into a
    specific cell. For example: when the user moves the cursor to "B5", the
    calendar control should become visible. The user then clicks on a date,
    which is updated in cell "B5"

    My problem is I do not know how to detect when the user selects a
    specific cell in order to run the procedure. Is there a way?


  2. #2
    Ardus Petus
    Guest

    Re: How to run a procedure on entering a specific cell?

    Create:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    in worksheet code.

    Target tells you which cell(s) have been selected.

    HTH
    --
    AP

    <SmoothFlyer@gmail.com> a écrit dans le message de
    news:1142259371.668460.321960@z34g2000cwc.googlegroups.com...
    > How to run a procedure on entering a specific cell?
    >
    > I am trying to pop up a calendar control to enter a date into a
    > specific cell. For example: when the user moves the cursor to "B5", the
    > calendar control should become visible. The user then clicks on a date,
    > which is updated in cell "B5"
    >
    > My problem is I do not know how to detect when the user selects a
    > specific cell in order to run the procedure. Is there a way?
    >




  3. #3
    Henrich
    Guest

    RE: How to run a procedure on entering a specific cell?

    Hi, try this:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    cell_position = "$B$5"
    check = ActiveCell.CurrentRegion.Address
    If cell_position = check Then MsgBox "Your action"
    ' runs when a the cell is entered
    End Sub


    „SmoothFlyer@gmail.com" napĂ*sal (napĂ*sala):

    > How to run a procedure on entering a specific cell?
    >
    > I am trying to pop up a calendar control to enter a date into a
    > specific cell. For example: when the user moves the cursor to "B5", the
    > calendar control should become visible. The user then clicks on a date,
    > which is updated in cell "B5"
    >
    > My problem is I do not know how to detect when the user selects a
    > specific cell in order to run the procedure. Is there a way?
    >
    >


+ 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