Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Use of ListBox with VBA
Hi,
I've an Excel listbox populated with numbers as text i.e. '001 '002 etc when selected the item, it returns into a cell in the following format: 1 2 etc. I need to keep the leading zeros: how can I do it with VBA? Thanks for any suggestion. V |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Use of ListBox with VBA
You could format the cell beforehand
With Range("B1") .NumberFormat = "@" .Value = ListBox1.Value End With -- HTH RP (remove nothere from the email address if mailing direct) "Voskre" wrote in message ... Hi, I've an Excel listbox populated with numbers as text i.e. '001 '002 etc when selected the item, it returns into a cell in the following format: 1 2 etc. I need to keep the leading zeros: how can I do it with VBA? Thanks for any suggestion. V |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
listbox B conditional of input in Listbox A | Excel Discussion (Misc queries) | |||
Multicolumn Listbox and ordinary listbox | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Is refreshing listbox rowsource in listbox click event possible? | Excel Programming | |||
Sorting ListBox results or transposing ListBox values to other cells for sorting | Excel Programming |