Combo box transpose issue

Kellogg

New Member
Joined
Mar 30, 2013
Messages
41
Platform
  1. Windows
  2. MacOS
Dear Great Minds of Excel,

I'm trying to populate a combo, cbxComboBox, box using row data instead of column data. I have a code that works if I'm on the same worksheet but does not work when on a different worksheet. My userform pulls data from multiple worksheets at once and I would like to have this code work from anywhere as well. Here is what I have:


Code:
myArray = WorksheetFunction.Transpose(Worksheets("Sheet1").Range(Cells(RowNmbrCI, 2), Cells(RowNmbrCI, lastColumn)))

  With Me.cbxComboBox
   .List = myArray
  End With



My other dropdowns work when I'm not transposing the data. Any help is always appreciated. Thanks.


/s/

Craig
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Maybe:
Code:
    With Worksheets("Sheet1")
        myArray = WorksheetFunction.Transpose(.Range(.Cells(RowNmbrCI, 2), .Cells(RowNmbrCI, lastColumn)))
    End With
 
Upvote 0
John_w,

That's the ticket! I cant believe an additional with statement made the difference. THANKS!



/s/

Craig
 
Upvote 0

Forum statistics

Threads
1,217,346
Messages
6,136,042
Members
449,981
Latest member
kjd513

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