ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   trying to populate a variable from a combo box (https://www.excelbanter.com/excel-programming/318639-trying-populate-variable-combo-box.html)

lwhite

trying to populate a variable from a combo box
 
I am trying to fill a variable with the value from a
combo box.

I tried the following

Dim myDesc as String
myDesc = Me.ComboBox2

and then I tried
Dim myDesc as String
Set myDesc = Me.ComboBox2

Could someone please tell me what I am doing wrong?
LWhite

Bob Phillips[_6_]

trying to populate a variable from a combo box
 
Try

myDesc = Me.ComboBox2.Value

--

HTH

RP
(remove nothere from the email address if mailing direct)


"lwhite" wrote in message
...
I am trying to fill a variable with the value from a
combo box.

I tried the following

Dim myDesc as String
myDesc = Me.ComboBox2

and then I tried
Dim myDesc as String
Set myDesc = Me.ComboBox2

Could someone please tell me what I am doing wrong?
LWhite




lwhite[_2_]

trying to populate a variable from a combo box
 
Value? Of course!

Thank you.
-----Original Message-----
Try

myDesc = Me.ComboBox2.Value

--




All times are GMT +1. The time now is 06:04 AM.

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