Storing data in VBA into one single row in worksheet using userforms

VBAmalta89

Board Regular
Joined
Mar 25, 2011
Messages
116
I have a user form where I need the user to input some data which will be stored in one row after which the user will exit the form. When new data is to be added (using the userform again) it must be added on the next row.

How can i do this? I am new to VBA programming so I would appreciate your help.

Thanks!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
i had a look at that but I couldnt understand this line of code:

irow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row

How can I specify in the coding where to look for the empty row where data is to be added?
 
Upvote 0
what i mean is that how can i specify that for example i want it to start inserting data from row 3 in column C then the next entries are in row 4
 
Upvote 0
Try like this

Code:
Range("C" & Rows.Count).End(xlUp).Offset(1).Value = TextBox1.Value
 
Upvote 0

Forum statistics

Threads
1,224,581
Messages
6,179,668
Members
452,936
Latest member
anamikabhargaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top