ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to add a variable in a range for a Combo Box (https://www.excelbanter.com/excel-programming/277449-re-how-add-variable-range-combo-box.html)

Bob Phillips[_5_]

How to add a variable in a range for a Combo Box
 
Kali,

Too many quotes

ComboBox1.RowSource = ("D3:D" & totalRow)


--

HTH

Bob Phillips

"Kali" wrote in message
...
I have a user form with a combo box, and I am populating
it with Excel cells, but as I will use different
worksheets, the range will change.

For example: I have
ComboBox1.RowSource = ("D3:D100")

And I want to put somrthing like
ComboBox1.RowSource = ("D3:D" & totalRow")

But I don't know the syntax to put the variable in there.
All help will be apreciated!




Kali

How to add a variable in a range for a Combo Box
 
Thank you, Bob and Tom!
Kali.


-----Original Message-----
Kali,

Too many quotes

ComboBox1.RowSource = ("D3:D" & totalRow)


--

HTH

Bob Phillips

"Kali" wrote in message
...
I have a user form with a combo box, and I am

populating
it with Excel cells, but as I will use different
worksheets, the range will change.

For example: I have
ComboBox1.RowSource = ("D3:D100")

And I want to put somrthing like
ComboBox1.RowSource = ("D3:D" & totalRow")

But I don't know the syntax to put the variable in

there.
All help will be apreciated!



.



All times are GMT +1. The time now is 10:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com