I have a user form with a few test boxes where the user will input data. Each text box will store the data in a particular row on a worksheet once the user clicks the ADD button.
The code I am using for storing the data is as follows:
ActiveSheet.Range("B" & Rows.Count).End(xlUp).Offset(1, 0).Value = Me.NCPNo.Value
Worksheets("ANNUAL NCP DATA").Range("B" & Rows.Count).End(xlUp).Offset(1, 0).Value = Me.NCPNo.Value
ActiveSheet.Range("C" & Rows.Count).End(xlUp).Offset(1, 0).Value = Me.IssueDate.Value
Worksheets("ANNUAL NCP DATA").Range("C" & Rows.Count).End(xlUp).Offset(1, 0).Value = Me.IssueDate.Value
ActiveSheet.Range("D" & Rows.Count).End(xlUp).Offset(1, 0).Value = Me.IssueMonth.Value
Worksheets("ANNUAL NCP DATA").Range("D" & Rows.Count).End(xlUp).Offset(1, 0).Value = Me.IssueMonth.Value
The problem with this code is that if for example in one of the entries which will be stored in row A, text box 1 is intentionally left blank, then the next entry will store the data from text box 1 in row A instead of in row B.
Any idea how I can alter the code above so that each entry will fill up one row and shift storage of data to the next row, thus ignoring blank entries?
Thanks.
Bookmarks