loststudent
New Member
- Joined
- Jan 25, 2018
- Messages
- 7
Hi, everyone!
I'm currently doing a VBA application for updating a company's stock.
I'm trying to get the data from the UserForm combo boxes and text boxes to go into a spreadsheet but all I have so far is data going to the chosen cells. Everytime I clear the UserForm and add other data, those cells keep updating themselves, instead of moving on to the next row and populating it.
This is the code I have:
I have tried many variations of this code, hoping it would work, but it either gets me 2 cells with the same value or keep updating the same cells.
Could someone (please please please) help me with a code that would make the data populate the next rows everytime I complete the UserForm?
Thank you
I'm currently doing a VBA application for updating a company's stock.
I'm trying to get the data from the UserForm combo boxes and text boxes to go into a spreadsheet but all I have so far is data going to the chosen cells. Everytime I clear the UserForm and add other data, those cells keep updating themselves, instead of moving on to the next row and populating it.
This is the code I have:
Code:
Private Sub CmmBAddOrder_Click()
Sheet3.Range("C5").Activate
ActiveCell.Value = TxtBoxOrderNo
ActiveCell.Offset(0, 1).Value = TxtBoxSupplier
ActiveCell.Offset(0, 2).Value = TxtBoxDate
ActiveCell.Offset(1, 0).Select
End Sub
I have tried many variations of this code, hoping it would work, but it either gets me 2 cells with the same value or keep updating the same cells.
Could someone (please please please) help me with a code that would make the data populate the next rows everytime I complete the UserForm?
Thank you