-
Solved: Use a spreadsheet specifies interval even if another is active
Hi.
I need to take breaks
ComboBox1.RowSource = Worksheets ("Sheet2"). Range ("Table1"). Address
with the tab "Sheet1" I've been active, but the code below to select the tab "Sheet1" to ComboBox1, takes values tab "Sheet1" and I pointed out that it is in line to pick up the tab interval "Sheet2"
[VBA]Private Sub UserForm_Initialize()
With Sheet2
ComboBox1.RowSource = Worksheets("Sheet2").Range("Table1").Address
ComboBox2.RowSource = Worksheets("Sheet2").Range("Table2").Address
End With
End Sub[/VBA]
Thank you!!
-
[vba] ComboBox1.RowSource = Worksheets("Sheet2").Range("Table1").Address(external:=True)
ComboBox2.RowSource = Worksheets("Sheet2").Range("Table2").Address(external:=True)
[/vba]
or:[VBA] ComboBox1.List = Application.Transpose(Worksheets("Sheet2").Range("Table1"))
ComboBox2.List = Application.Transpose(Worksheets("Sheet2").Range("Table2"))
[/VBA]
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules