ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   listbox default datatype (https://www.excelbanter.com/excel-programming/308609-listbox-default-datatype.html)

grinning_crow[_6_]

listbox default datatype
 
I have a series of 5 listboxes on a form and the values (single select
from these listboxes are used in various calculations in the app.

Unfortunately, when I open the the workbook and the form loads, I don'
want anything selected and since the initialize event also runs th
change events of the listbox (which contains a function wit
calculations based on the selected item), I get an invalid use of nul
error.

I've now found out that whilst some of the non selected listboxes ar
returning an empty string (i.e. "") one or two of them (and it isn'
consistent which one or two) are returning Null as their value. I hav
found a way round this by duplicating the Access function Nz() t
handle Null values but I was wondering if there was any way of settin
the default datatype of a listbox? I.e. can I set my listboxes t
always return Strings?

Any help or comments are appreciated.

Thanks

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 09:47 PM.

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