Combobox in Worksheet

backup69

Active Member
Joined
Jan 20, 2004
Messages
271
Hi
I need litle help.I have combobox in worksheet("Sheet4") and source for this in worksheet("Sheet2").
I make combobox list in propertis Listfillrange = Sheet2!A11:A19
and try make Click or Change event.
In sheet2 Column A i have only names for combobox and in Column B i have values what i want use in the sheet4.
Code:
Private Sub ComboBox1_Change()
    Dim source
    input = ComboBox1.Value
    Set source = Worksheets("Andmebaas").Range("A11:A13").Find(what:=ComboBox1.Value)
 'here i need some check information if combodbox value = find value in sheet2 then i need take information behind this value in column B and put this in to the selection in sheet4. only if my selected area is Range("L2:L30")
    
For Each c In source
    If input = source and Activesheet.Selection = Range("L2:L30") Then

Selection.Value =
    End If
    Next
End Sub

can anyone help me
 
OK, try:

Code:
If Range("aeg").Address = Union(Selection, Range("aeg")).Address Or Range("aeg2").Address = Union(Selection, Range("aeg2")).Address Then
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,216,100
Messages
6,128,824
Members
449,470
Latest member
Subhash Chand

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