hey guys got an annoying problem. whenever i try to enter numbers into a list box they keep coming up like a box like this in the properties window and on the actual form they are displayed like this │. anyone know what the problem is.
Printable View
hey guys got an annoying problem. whenever i try to enter numbers into a list box they keep coming up like a box like this in the properties window and on the actual form they are displayed like this │. anyone know what the problem is.
I used this:Quote:
Originally Posted by oldmcgroin
VB Code:
Private Sub Form_Load() With Me.List1 .AddItem 1 .AddItem 2 .AddItem 3 .AddItem 4 End With End Sub
and I got this:
How are you adding the numbers in?Quote:
Originally Posted by oldmcgroin
i was just putting them in using 'List' in the list properties window. Using numbers 1 -9 i get the box but if use 10 upwards the numbers come up ok. its quite strange. this has only just started happening
Quote:
Originally Posted by oldmcgroin
Why not use the method I posted to load the ListBox?
yeah i tried that and it worked but its more time consuming, ;) . i just wanted to know why it happened and if it had a happened to anyone else and if there was a way to fix it.
Yes there is a way to fix it' if that the method you like using you can press [ENTER] after you enter each number in the text field Press 1 -> press Enter press 2 Press Enter
also you chould put them into a File then paste them in.
tho time comsumeing as pointed above.
You have to hold down the "Control" Key first and then Press the "Enter" Key. Try it.Quote:
Originally Posted by dreamvb
Quote:
Originally Posted by oldmcgroin
If you are adding sequential numbers you can try this:
VB Code:
Private Sub Form_Load() Dim a as Long With Me.List1 For a = 1 to 100 .AddItem a Next a End With End Sub
I think you meant the List Property:Quote:
Originally Posted by dreamvb
this is what happens when i enter text into a the list dropdown box thingy in the listbox property window
- (should be 1)
- (2)
- (4)
- (7)
- (8)
10 - 10 onward is ok.
screenshot
Yes you were right List PropQuote:
You have to hold down the "Control" Key first and then Press the "Enter" Key. Try it.
Cool thanks for that. never know that one before., it's true you learn something new eveyday.
Quote:
Originally Posted by oldmcgroin
If you type in:
01
02
03
04
05
06
07
08
09
what happens?
Quote:
Originally Posted by dreamvb
I found that one by mistake one day . . .
Quote:
Originally Posted by oldmcgroin
Here is a dumb question, what Font are you using?
using MS Sans Serif. I tried 01, 02, 03 etc and that sorted it out. its kind of annoying but i can work with it. :p .
cheers guys :thumb:
Hey, is it possible for you to zip up the form and the project file so I can take a look at the problem. Remove any confidential code.Quote:
Originally Posted by oldmcgroin
yeah no problem, here you go. let me know what you make of it :thumb:
Quote:
Originally Posted by oldmcgroin
Sure enough when I opened the project file I saw the 's, just like in your post. I deleted the 's and I was able to type in the numbers from 1 to 10 with no problem. So deleted the numbers and then try re-typing them but instead of hitting the ENter Key after each number hold down the control key then press the Enter Key, you will see that the cursor advance to the next line.