ExcelBanter

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

tjh

Listbox value
 
Hello,

How can you describe a blank value in a listbox. Such as if the user did not
choose a value.
I started the following code and the value is not working correctly.
Thank You

If listbox.Value Is Null Then
MsgBox ("Please make a selection")
Else
End If

Chip Pearson

Listbox value
 
The ListIndex property of the list box will be -1 if no selection
has been made.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"tjh" wrote in message
...
Hello,

How can you describe a blank value in a listbox. Such as if the
user did not
choose a value.
I started the following code and the value is not working
correctly.
Thank You

If listbox.Value Is Null Then
MsgBox ("Please make a selection")
Else
End If





All times are GMT +1. The time now is 05:38 PM.

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