VBA - prompt to enter data

  • Re: VBA - prompt to enter data


    Use an InputBox--something like this:



    Quote from nuttytart1987

    After recording a macro that goes to last figure in data, how do I edit this to prompt for a new data value and enter it into 1st empty cell at end of data?

  • Re: VBA - prompt to enter data


    Thanks, greatly appreciated, don't suppose you know how once i've entered the data into the message box, I can get it into the first empty cell at the end of the data?

  • Re: VBA - prompt to enter data


    Code in the above message should be amended to include that.


    Quote from nuttytart1987

    Thanks, greatly appreciated, don't suppose you know how once i've entered the data into the message box, I can get it into the first empty cell at the end of the data?

  • Re: VBA - prompt to enter data


    Just another option instead of a Do...Until loop


    Code
    Range("A1").End(xlDown).Offset(1, 0) = TheAnswer


    Obviously given that you have used the InputBox methode to obtain 'TheAnswer' as MrkFrrl suggests and that the blank cell you are looking for is in column A.


    HTH


    KJ

  • Re: VBA - prompt to enter data


    I think XlUp is the best way to find the last used/next empty cell in a column. xlDown will stop at the first empty cell, not necessarily the last cell with data in the column.


    Code
    'using Rows.Count will allow for increased rows available in the next Excel version
    Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Value = TheAnswer
  • Re: VBA - prompt to enter data


    Hello bigmiz,


    Welcome to OZgrid.


    Please do not post your question in threads started by others - - this is known as thread hijacking.
    Always start a new thread for *YOUR* question. If you find it helpful to clarify your needs you can include a link to this ( or any other ) thread.


    When starting a new thread be sure to give it a search-friendly title that aptly describes your need.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!