Data Input Box

adamwalt

New Member
Joined
Apr 22, 2018
Messages
3
Hello all,
I am new to this site and am in need of some help.
I have created a userform with 4 boxes for text entry and then submit and reset buttons.
I want to have a button on the worksheet that will open up the userform which will then get filled out and the data entered into the sheet. Each entry to fall in the row below.
Two of the four boxes are combo boxes.
I have a screenshot but I am not sure how to upload it.
Thanks!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Sale%20Input.JPG
 
Upvote 0
Are you saying you also need us to write you a script to Open the userform?
It would be something like this: Userform1.show

Now we need to know the name of all these textbox's and the comboboxe's

And where exactly does each textbox value get pasted to.

You only said:

Each entry to fall in the row below.

You mean:
Textbox1 value goes in A1
Textbox2 value goes in A2
Textbox3 value goes in A3

If not explain in detail.
 
Upvote 0
What I mean is the first time the data is entered it would go into A1, B1, C1, D1. Then the next time it is entered it would go into A2, B2, C2, D2 and so on.
The first box is txtDate, where a date is entered. The next is a combobox (CBName) where a name would be selected. Then a combobox (CBPolicy) and finaly txtAmt.
Once the data is input, BtnSubmit, will submit the data and BtnReset will reset the fields.
 
Upvote 0
Try this:
You said start in row(1) but in most all cases that is not what users want.
This script starts in row(2). Most users have headers in row(1)

Code:
Private Sub CommandButton3_Click()
'Modified 4-22-18 11:25 PM EDT
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "A").End(xlUp).Row + 1
Cells(Lastrow, "A").Value = txtDate.Value: txtDate.Value = ""
Cells(Lastrow, "B").Value = CBName.Value: CBName.Value = ""
Cells(Lastrow, "C").Value = CBPolicy.Value: CBPolicy.Value = ""
Cells(Lastrow, "D").Value = txtAmt.Value: txtAmt.Value = ""
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,797
Members
449,048
Latest member
greyangel23

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