Forum Discussion
How to retrieve a list (from 1 sheet) for a Combo Box in another sheet (of the same excel workbook)
Sheet1 (501) has a combo box in there. - Named 501
The combo box is empty.
I need assistance with filling this Combo Box with my list from Sheet21 (LESSON PLAN). - Named LESSON PLAN
The 'list' in Sheet21 is currently located in rows/columns:- X1975:X1995. (As it is a test worksheet)
How can I get Sheet1 501 Combobox to show the information from Sheet 21 LESSON PLAN list?
I have tried different codes from the net, and I am currently working with this to see if it works, which it doesn't. Please help.
Option Explicit
Sub Validar_501()
Dim aba1 As Worksheet 'Worksheet contain only data (no objects)
Set aba1 = Worksheets("501")
'To declare a variable of type Sheet you need to use its "CodeName"
Dim aba2 As Sheet2 'Sheet can contain data and other objects
Set aba2 = Sheets("501") 'like ListBoxes, Charts, ComboBoxes, etc
aba2.ComboBox1.Clear
aba2.ComboBox1.List = aba1.Range("X1975:X1995" & _
aba1.Range("A" & aba1.Rows.Count).End(xlUp).Row).Value
End Sub
Private Sub ComboBox1_Change()
End Sub