4 combo boxes and a userform.

not very bright dave

Board Regular
Joined
Dec 20, 2004
Messages
244
I'm about to enter uncharted waters, at least as far as I'm concerned. I want to build a userform (most likely using comboboxes) which will add a row of data (name in A1, Salary in B1 etc) to a spreadsheet from row 1 down (always using the next available row, then I want to be able to repopulate the userform with a chosen row of data when the row needs modifying. I know it’s a long shot, but is there an easy to follow guide out there anyone can point me in the direction of that sounds similar to this?

I'll be eternally grateful if anyone can help.

Thanks

Dave
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi Dave,
Don't know of any guides off hand, but I could show you how this is done fairly easily.
How is the row you want the comboboxes populated with (for editing) to be determined? Will it be for example the active cell row, or are you wanting to be able to select from one of the comboboxes and have the rest of that row populate the remaining comboboxes?

Dan
 
Upvote 0
You could use Data, Form (though that won't let you edit records, just delete them and create new ones).
 
Upvote 0
Taz, I didn't actually know about that, I'll see if I can make use of that another time.

Dan - I think selecting the record I want to modify from the first field (if possible) in the userform would be fantastic.
Thanks

Dave
 
Upvote 0
Well,
We can certainly do what I was thinking in the beginning, but Taz's idea would produce the same results, be able to be added to without having to change your userform manually, and can indeed edit or delete your records. It's a very useful tool for what I think you're after. I wish I'da thought of that first myself. Check it out and see if you still want to do everything manually after you've seen what it can do.
(Good call Taz! (y) )

Dan

Edit: You'll just want to make sure you use a header row (in bold is good) for the dataform to recognize the catagories from the records.
 
Upvote 0
Dave,
Here's a simple example of how your data should look for use in a dataform.
Once you have it layed out like this, simply create a button and assign this code to it. (Amend sheet name or use ActiveSheet)

Code:
Sub ShowMyForm()
Sheet1.ShowDataForm
End Sub
Book2
ABCDE
1NameSaleryPet1Pet2
2Pam$50,001DogCat
3Tom$50,002Hogowl
4John$50,003PigCat
5Steve$50,004DogYak
6Sammy$75,000CatHog
Sheet1


Let me know if you still want to go the way of the userform.
Dan
 
Upvote 0
Hi Dan

I looked at Taz's suggestion and it does work. The only problem is that it lets you enter unvalidated data. Ideally, I would like drop down boxes on the fields as I have specific job roles etc the records need to conform to. Can you see an easy solution to this using the dataform?

Thanks

Dave
 
Upvote 0
No, I don't see a solution to this with the dataform. I think it pretty much allows the users to make any entries they want.

What sort of criteria do you want to use to "validate" the entries in each of your comboboxes? (And you're still thinking of these comboboxes as being in a userform, right?)

Dan
 
Upvote 0
I was really pleased to find this thread as it describes more or less what we are trying to do.
The data sheet works well, but we really need to have option buttons or check boxes for four of the fields as they indicate which of 4 options is being followed up. We also have one field that is for notes and so will have more text entered than the dataform shows.
Is there any way to edit the standard dataform (ie the one from Data > Form)? If not is there any way to copy it and then change the entries I want to amend?

As Dave said in his initial posting, I am entering uncharted waters and I will be eternally grateful if anyone can help!

Thanks. :confused:
 
Upvote 0
Nope. As far as I know there is no way to put optionbuttons / checkboxes on a dataform. You'd need to create a userform for that.
How much text is the notes field likely to have? (I'm thinking a ListBox control in your userform for this)
What exactly would you want the option buttons / checkboxes to do?

"entering uncharted waters"... Does that mean you've not worked with userforms before? If so, they're not hard, there's just a lot of options so you've got some experimenting to do and decisions to make.

If you can describe what it is you want and what you want it to do, we can certainly help.

Dan
 
Upvote 0

Forum statistics

Threads
1,203,649
Messages
6,056,544
Members
444,872
Latest member
agutt

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