Results 1 to 19 of 19

Thread: [RESOLVED] Problem with numbers in list box --> 

  1. #1

    Thread Starter
    Addicted Member oldmcgroin's Avatar
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    182

    Resolved [RESOLVED] Problem with numbers in list box --> 

    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.

  2. #2
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Problem with numbers in list box --> 

    Quote Originally Posted by oldmcgroin
    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:

    VB Code:
    1. Private Sub Form_Load()
    2.     With Me.List1
    3.         .AddItem 1
    4.         .AddItem 2
    5.         .AddItem 3
    6.         .AddItem 4
    7.     End With
    8. End Sub

    and I got this:
    Attached Images Attached Images  
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Problem with numbers in list box --> 

    Quote Originally Posted by oldmcgroin
    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.
    How are you adding the numbers in?

  4. #4

    Thread Starter
    Addicted Member oldmcgroin's Avatar
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    182

    Re: Problem with numbers in list box --> 

    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

  5. #5
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Problem with numbers in list box --> 

    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 strnage. this has only just started happening

    Why not use the method I posted to load the ListBox?
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  6. #6

    Thread Starter
    Addicted Member oldmcgroin's Avatar
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    182

    Re: Problem with numbers in list box --> 

    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.

  7. #7
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    UK
    Posts
    417

    Re: Problem with numbers in list box --> 

    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.
    When your dreams come true.
    On error resume pulling hair out.

  8. #8
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Problem with numbers in list box --> 

    Quote Originally Posted by dreamvb
    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.
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  9. #9
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Problem with numbers in list box --> 

    Quote Originally Posted by oldmcgroin
    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.

    If you are adding sequential numbers you can try this:

    VB Code:
    1. Private Sub Form_Load()
    2. Dim a as Long
    3.     With Me.List1
    4.         For a = 1 to 100
    5.                .AddItem a
    6.         Next a
    7.     End With
    8. End Sub
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  10. #10
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Problem with numbers in list box --> 

    Quote Originally Posted by dreamvb
    . . . each number in the text field Press 1 -> press Enter press 2 Press Enter . . .
    I think you meant the List Property:
    Attached Images Attached Images  
    Last edited by Mark Gambo; Aug 26th, 2005 at 10:19 AM.
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  11. #11

    Thread Starter
    Addicted Member oldmcgroin's Avatar
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    182

    Re: Problem with numbers in list box --> 

    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
    Attached Images Attached Images  

  12. #12
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    UK
    Posts
    417

    Re: Problem with numbers in list box --> 

    You have to hold down the "Control" Key first and then Press the "Enter" Key. Try it.
    Yes you were right List Prop

    Cool thanks for that. never know that one before., it's true you learn something new eveyday.
    When your dreams come true.
    On error resume pulling hair out.

  13. #13
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Problem with numbers in list box --> 

    Quote Originally Posted by oldmcgroin
    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

    If you type in:
    01
    02
    03
    04
    05
    06
    07
    08
    09

    what happens?
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  14. #14
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Problem with numbers in list box --> 

    Quote Originally Posted by dreamvb
    Yes you were right List Prop

    Cool thanks for that. never know that one before., it's true you learn something new eveyday.

    I found that one by mistake one day . . .
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  15. #15
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Problem with numbers in list box --> 

    Quote Originally Posted by oldmcgroin
    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

    Here is a dumb question, what Font are you using?
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  16. #16

    Thread Starter
    Addicted Member oldmcgroin's Avatar
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    182

    Re: Problem with numbers in list box --> 

    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. .


    cheers guys

  17. #17
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Problem with numbers in list box --> 

    Quote Originally Posted by oldmcgroin
    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. .


    cheers guys
    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.
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  18. #18

    Thread Starter
    Addicted Member oldmcgroin's Avatar
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    182

    Re: [RESOLVED] Problem with numbers in list box --> 

    yeah no problem, here you go. let me know what you make of it
    Attached Files Attached Files

  19. #19
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: [RESOLVED] Problem with numbers in list box --> 

    Quote Originally Posted by oldmcgroin
    yeah no problem, here you go. let me know what you make of it

    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.
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width