Call input box by command button for Data entry.

  • Hi,

    I searched many forums but don't get a specific solution for It. Hope someone read and gives a solution.

    I have a datasheet where I have to Entry Data in column "AJ"

    suppose I select a cell in the "I" column e.g "I9" and then press the command button an Input box open where I input the value. Then the Data is automatically input in cell "Aj9"

    If No Data given then nothing happens.

    Thanks in advance.

  • Thanks for the reply

    I9 is an example.

    Actually, the selection of any cell of"I" column defines the row for my value selection.

    If I select any cell between I9:I1200 the corresponding cell of AJ will be the data input location.

    If I select I120 then AJ120 will be the data input location,

    If I select I190 then AJ190 will be the data input location,

    Hope you understand my thoughts.

  • Code
    Option Explicit
    Sub InputBoxEntry()
    Dim DataVal As String
        DataVal = InputBox("Enter Value ...", "Data Entry")
        ActiveCell.Offset(0, 27) = DataVal
    End Sub

Participate now!

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