Add Row After Last Row

sd2173

New Member
Joined
Feb 16, 2011
Messages
31
Good evening all, any help appreciated.

I am rookie status with Excel programming and it has been a couple years since I have done anything, so forgive me...

I am trying to find the simplest way to add data obtained in a form (via user entry and button click) to the next row in a worksheet. Users will have listed in the form a 'name' and be asked to select from a combo box an 'intervention' and fill in a text box for 'comments'. Upon clicking I would like a new row to be added to a worksheet showing first, current date, then 'name', 'intervention', 'comment'.

I don't know why this is such a struggle for me to recall how to add to a running worksheet but any help is much appreciated.

Regards,
SD
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:DoNotOptimizeForBrowser/> </w:WordDocument> </xml><![endif]--> ‘This will give you a idea of the procedure

‘Create a form with Textbox1, Textbox2 and CommandButton1
‘‘Put the following in the forms code module for the
‘ CommandButton1_Click()
‘--------------------------------------------
‘--------------------------------------------
‘--------------------------------------------
Private Sub CommandButton1_Click()
If UserForm1.TextBox1.Value = "" Then Exit Sub
LastUsedCell = Range("A65536").End(xlUp).Row
Range("A1").Offset(LastUsedCell, 0).Value = UserForm1.TextBox1.Text
Range("A1").Offset(LastUsedCell, 1).Value = UserForm1.TextBox2.Text
End Sub
‘--------------------------------------------
‘--------------------------------------------
‘--------------------------------------------
 
Upvote 0

Forum statistics

Threads
1,215,204
Messages
6,123,630
Members
449,109
Latest member
Sebas8956

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