VBA userform that will fill multiple boxes from one selection

Linzalin

New Member
Joined
Apr 13, 2020
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Good morning,

I have created a VBA userform to add details for students in school. Each time I add a new student, I have to then fill each box with their details - year, form etc. Is there a way to automatically fill more than one box from a selection? So for example, if I select James Smith A3, it would then add B3 (year) and B4 (B4) into the right boxes. If you could sign post me to a video and I'll try to work it out from there. I am not sure what this is called so I have not had any luck searching for an example.

Thanks!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi! Are you ok?

Do you need add all columns to the combobox, name, year and etc. Do you can make this with a named range on the property "RowSource", but remember of the columns number on the property "ColumnCount". From there, in the AfterUpdate event of the combobox, you add the column values in the Textbox with this pattern: Me.NameTextBox = Me.NameCombobox.Column(NumberColumn).Value

Remember, the column count starts at zero, so if you add five columns the count will be 0,1,2,3,4.
 

Attachments

  • cmbbx.png
    cmbbx.png
    36.9 KB · Views: 4
Last edited:
Upvote 0
Hello I am great thanks, a bit puzzled trying to work this one out! How are you?

I would like to add the information into separate boxes and then in separate columns on the spreadsheet once I submit. Can I do this with the column count option?
 
Upvote 0
Hello I am great thanks, a bit puzzled trying to work this one out! How are you?

I would like to add the information into separate boxes and then in separate columns on the spreadsheet once I submit. Can I do this with the column count option?

I'm ok, thanks!

Yes, you can. First do the combobox procedures, after on the spreadsheet.
We help you ok?
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,370
Members
449,080
Latest member
Armadillos

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