+ Reply to Thread
Results 1 to 4 of 4

Pausing a macro while waiting for an input into a cell

  1. #1
    Francois Ashton
    Guest

    Pausing a macro while waiting for an input into a cell

    Hi all

    Hopefully this is not a dumb question and has probably been asked before,
    but I can't find the answer at the moment.

    I need a macro to be paused while waiting for a user to input a value into a
    cell. So once the value is inputed in the cell and "enter" is hit the macro
    continues.

    I want to try to avaiod using input boxes.

    Help is appreciated.

    Francois



  2. #2
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    Don't think this is possible - the closest I've managed to get is to split the macro in two at the point where the input is required, lock all the cells except the one I want the data in, set the worksheet's EnableSelection property to xlUnlockedCells and then use the Worksheet_Change event to detect when the user has entered any input. It's a long-winded way of doing it, but it does work.

    If anyone else knows a better way I'd be very interested to see (and steal! ) it.
    Col

  3. #3
    NickHK
    Guest

    Re: Pausing a macro while waiting for an input into a cell

    Francois,
    Macro code does not run anyway when the user is in Edit Mode.
    And the can't enter Edit Mode whilst there is code running.

    To start code after input, put it in the Worksheet_Change event.

    NickHK

    "Francois Ashton" <francois@vitria.co.za> wrote in message
    news:uckf7eyqGHA.5012@TK2MSFTNGP03.phx.gbl...
    > Hi all
    >
    > Hopefully this is not a dumb question and has probably been asked before,
    > but I can't find the answer at the moment.
    >
    > I need a macro to be paused while waiting for a user to input a value into

    a
    > cell. So once the value is inputed in the cell and "enter" is hit the

    macro
    > continues.
    >
    > I want to try to avaiod using input boxes.
    >
    > Help is appreciated.
    >
    > Francois
    >
    >




  4. #4
    Francois Ashton
    Guest

    Re: Pausing a macro while waiting for an input into a cell

    Thanks NickHK and col

    I am sure I can do something with this. I thought this might be the case.

    Francois

    "NickHK" <TungCheWah@Invalid.com> wrote in message
    news:%230FPxqyqGHA.148@TK2MSFTNGP04.phx.gbl...
    > Francois,
    > Macro code does not run anyway when the user is in Edit Mode.
    > And the can't enter Edit Mode whilst there is code running.
    >
    > To start code after input, put it in the Worksheet_Change event.
    >
    > NickHK
    >
    > "Francois Ashton" <francois@vitria.co.za> wrote in message
    > news:uckf7eyqGHA.5012@TK2MSFTNGP03.phx.gbl...
    >> Hi all
    >>
    >> Hopefully this is not a dumb question and has probably been asked before,
    >> but I can't find the answer at the moment.
    >>
    >> I need a macro to be paused while waiting for a user to input a value
    >> into

    > a
    >> cell. So once the value is inputed in the cell and "enter" is hit the

    > macro
    >> continues.
    >>
    >> I want to try to avaiod using input boxes.
    >>
    >> Help is appreciated.
    >>
    >> Francois
    >>
    >>

    >
    >




+ 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