+ Reply to Thread
Results 1 to 3 of 3

Data input macro

  1. #1
    Jay Oken
    Guest

    Data input macro

    Can someone please post the code to create a macro that does the following.

    Pause for input on the current cell
    Move one cell to the right
    Pause for input
    Move one cell down and one cell to the left
    Re-invoke the macro

    Thanks,
    J



  2. #2
    Nick Hebb
    Guest

    Re: Data input macro

    You could just do this with the Selection_Change event for the
    worksheet:

    Private Sub Worksheet_Change(ByVal Target As Range)

    If Target.Column = X Then
    Cells(Target.Row, Target.Column + 1).Select
    ElseIf Target.Column = X+1 Then
    Cells(Target.Row + 1, Target.Column - 1).Select
    End If

    End Sub

    Change the Target.Column = X and X + 1 to the appropriate column
    numbers, where A = 1, B = 2, C = 3, etc.

    HTH,

    Nick Hebb
    BreezeTree Software
    http://www.breezetree.com


  3. #3
    Tom Ogilvy
    Guest

    Re: Data input macro

    VBA macros don't pause for input unless you want to use an input box.

    You would have to kludge something together selects a cell and ends. Then
    use an event to fire the next movement and end - and so forth. Guess it
    depends on how much control you want to have.

    You might try unlocking the specific cells, then setting EnableSelection so
    only unlocked cells can be selected, then protecting the sheet.

    --
    Regards,
    Tom Ogilvy

    "Jay Oken" <[email protected]> wrote in message
    news:[email protected]...
    > Can someone please post the code to create a macro that does the

    following.
    >
    > Pause for input on the current cell
    > Move one cell to the right
    > Pause for input
    > Move one cell down and one cell to the left
    > Re-invoke the macro
    >
    > Thanks,
    > J
    >
    >




+ 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