Data Enter Form

jb3700

New Member
Joined
Jun 8, 2015
Messages
8
Hi can anyone help:

have a small date enter from that Im trying to get the new data to be entered in below were the last enter was and in de-buging it keeps getting hung up at the :

Nrow = jb.Cells(Rows.Count, 1).End(x1up).Row + 1

Below is the full code:

Private Sub btnSubmit_Click()
Set jb = ThisWorkbook.Sheets("sheet1")


nrow = jb.Cells(Rows.Count, 1).End(x1up).Row + 1


Sheet1.Cells(nrow, 1) = CDate(Me.tbdate)
Sheet1.Cells(nrow, 2) = Me.cmblistitem
Sheet1.Cells(nrow, 3) = Me.tbuser


End Sub


Private Sub UserForm_Initialize()
Me.tbdate = Date
For Each X In
[list1]
Me.cmblistitem.AddItem X
Next X


End Sub
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Two things come to mind right away.
First change the 'Rows.Count' portion to 'jb.Rows.Count' to make sure it is correctly referencing the sheet.
The second thing (and likely the culprit in this instance) is you have '.End(x1up).Row'. It should have the lower case letter L, not the number 1. i.e. '.End(xlup).Row'
 
Upvote 0
Wow!! your good! Thank you, you were right is was l 1 it all looks so much alike

thank you
 
Upvote 0

Forum statistics

Threads
1,203,610
Messages
6,056,296
Members
444,855
Latest member
archadiel

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