ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listbox Value (https://www.excelbanter.com/excel-programming/347754-listbox-value.html)

StephanieH

Listbox Value
 
This has to be easier than I'm making it. I have two Listboxes on a form. I
want to combine the input from the listboxes to create a single value. For
instance if the value from Listbox2 is "2005" and Listbox3 is "03" I want my
value to be "2005_03". I've tried MyValue = " & ListBox2.Value & "_" &
Listbox3.Value & " and MyValue = ListBox2.Value "_" Listbox3.Value and
neither work. What am I doing wrong?

Dave Peterson

Listbox Value
 
MyValue = ListBox2.Value & "_" & Listbox3.Value

Didn't work?

StephanieH wrote:

This has to be easier than I'm making it. I have two Listboxes on a form. I
want to combine the input from the listboxes to create a single value. For
instance if the value from Listbox2 is "2005" and Listbox3 is "03" I want my
value to be "2005_03". I've tried MyValue = " & ListBox2.Value & "_" &
Listbox3.Value & " and MyValue = ListBox2.Value "_" Listbox3.Value and
neither work. What am I doing wrong?


--

Dave Peterson

StephanieH

Listbox Value
 
Ugh. So close, and yet so far.

Thanks Dave.



"Dave Peterson" wrote:

MyValue = ListBox2.Value & "_" & Listbox3.Value

Didn't work?

StephanieH wrote:

This has to be easier than I'm making it. I have two Listboxes on a form. I
want to combine the input from the listboxes to create a single value. For
instance if the value from Listbox2 is "2005" and Listbox3 is "03" I want my
value to be "2005_03". I've tried MyValue = " & ListBox2.Value & "_" &
Listbox3.Value & " and MyValue = ListBox2.Value "_" Listbox3.Value and
neither work. What am I doing wrong?


--

Dave Peterson



All times are GMT +1. The time now is 04:16 PM.

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