Hi,
I'm newbie about VBA Excel 2007 , i've found this example on J.Walkenbach book but when I insert the text in inputbox the the value in cell is not update , it remain blank, what could it be the problem?
Sub getdata()
Dim nextrow As Long
Dim entry1 As String, entry2 As String
Do
nextrow = Cells(Rows.Count, 1).End(xlUp).Row + 1
entry1 = InputBox("enter the name")
If entry1 = " " Then Exit Sub
entry2 = InputBox("enter the amount")
If entry2 = " " Then Exit Sub
Cells(nextrow, 1) = entry1
Cells(nextrow, 2) = entry2
Loop
End Sub
I'm newbie about VBA Excel 2007 , i've found this example on J.Walkenbach book but when I insert the text in inputbox the the value in cell is not update , it remain blank, what could it be the problem?
Sub getdata()
Dim nextrow As Long
Dim entry1 As String, entry2 As String
Do
nextrow = Cells(Rows.Count, 1).End(xlUp).Row + 1
entry1 = InputBox("enter the name")
If entry1 = " " Then Exit Sub
entry2 = InputBox("enter the amount")
If entry2 = " " Then Exit Sub
Cells(nextrow, 1) = entry1
Cells(nextrow, 2) = entry2
Loop
End Sub