Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Combo box with dynamic range formula only returns 1 column

$
0
0

hello all, I am a beginner at userform design and trying to get this code to work, in the named range reference on sheet2 I have

=OFFSET(Sheet2!$A$2:Sheet2!$B$2, 0, 0, COUNTA(Sheet2!$A:$A:Sheet2!$B:$B)-1,2) on the user form I have this 

Private Sub UserForm_Initialize()
'Populate combo box.
Dim rngBoProbsOpps As Range
Dim ws As Worksheet
Set ws = Worksheets("Sheet2")
For Each rngBoProbsOpps In ws.Range("BoProbsOpps")
Me.cmbProblemsOpps.AddItem rngBoProbsOpps.Value
Next rngBoProbsOpps
End Sub

Is the problem in the sub? seems like I need something that identifies column1 and column 2.  All the values end up in 1 column.

Thanks for any help


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>