combobox to cell

Hjemmet

Board Regular
Joined
Jun 20, 2018
Messages
207
I have on a Userform 20 Combobox to chose 20 Differens players from cell H62 to H82

My first Combobox 1 works fine

but they cant get the Rest to work….

and how did i get the combobox to put the player in cell

eksampel

Use combobox 1 to set player 1 in cell "B1" on Sheet"Lodtrækning"
and Combobox 2 to set player 2 in cell "B2" on Sheet"Lodtrækning"
Hope that that was enough info
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Can you supply the code that you're currently using?
 
Upvote 0
i try this code for the first combobox and try it to the second one two Change to nr 2 of course


Dim xRg As Range
'Updated by Extendoffice 2018/1/30
Private Sub UserForm_Initialize()
Set xRg = Worksheets("Lodtrækning").Range("H62:H85")
Me.ComboBox1.List = xRg.Columns(1).Value

End Sub
Private Sub ComboBox1_Change()
Me.TextBox1.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.Value, xRg, 1, False)

End Sub
 
Upvote 0
I'm afraid I don't understand what you are after.
Also why are you loading a Textbox with the same value as the same value as the Combobox?
 
Upvote 0
My Mistake with the Textbox i aint use the Textbx

but want t choose from list and put it into a cell fpr each combobox
 
Upvote 0
How about
Code:
Private Sub CommandButton2_Click()
   Dim i As Long
   For i = 1 To 20
      Range("B" & i).Value = Me.Controls("combobox" & i).Value
   Next i
End Sub
 
Upvote 0
i am to tired so ill have given up on this

it was not at Number but the name on the list from 1 to 20
 
Upvote 0
You have 20 comboboxes and want that value entered into Column B
Is that what you want?
 
Upvote 0
You have 20 comboboxes and want that value entered into Column B
Is that what you want?

Yes 20 Combobox where Name of players came from cell "H62 to H82"
and Combobox 1 set name of player 1 in cell B1 On sheet "lodtrækning" ect ect t combobox 20
B2 for player 2 and B3 for Player 3

Sorry i didn explain it right
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

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