hitman0801
New Member
- Joined
- Mar 29, 2018
- Messages
- 3
Hi Team,
I created a userform that would look for the next blank cell starting from Column "B" and return with the value in textbox1. I assigned the sub in commandbutton1 so that whenever I click it, the value of texbox1 will be placed in the next blank cell in column "B". I tried searching in Google and found the codes below:
I wanted to start in row 9. However, whenever I run the macro then the value of textbox1 will always be posted in "B9". So in the end, the codes does not look for the next blank cell but only replaces whatever is in cell "B9". I hope you can help me find what's wrong with the codes and suggest corrections. Thanks!
I created a userform that would look for the next blank cell starting from Column "B" and return with the value in textbox1. I assigned the sub in commandbutton1 so that whenever I click it, the value of texbox1 will be placed in the next blank cell in column "B". I tried searching in Google and found the codes below:
Code:
irow = ws.Cells(Rows.Count, 8).End(xlUp).Offset(1, 0).Row
.Range("B" & irow) = Textbox1.value
I wanted to start in row 9. However, whenever I run the macro then the value of textbox1 will always be posted in "B9". So in the end, the codes does not look for the next blank cell but only replaces whatever is in cell "B9". I hope you can help me find what's wrong with the codes and suggest corrections. Thanks!