No listbox "list" property and related problems
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: No listbox "list" property and related problems

  1. #1
    Join Date
    Aug 2009
    Posts
    8

    Question No listbox "list" property and related problems

    I am trying to write a little program/macro that opens a WORD file, you enter some data in text and combobox 's and then use search/replace function, then save file. I am getting to VB through the Macro function in Word.

    Two issues:
    1. When I have the form up and select the combobox and review the properties, there is NO "List" property. The properties table goes from "Left" to "Listrows" to "Liststyle" but no "List". When I use code to additem, that doesn't work either. I searched all the VB sites and they all said I can just use the "List" property to add the data items in the list. But it's not there.
    Last edited by tunetown11; August 16th, 2009 at 10:16 PM. Reason: Solved other problem

  2. #2
    Join Date
    Aug 2009
    Posts
    8

    Re: No listbox "list" property and related problems

    Deleted
    Last edited by tunetown11; August 16th, 2009 at 10:17 PM. Reason: No attachment

  3. #3
    Join Date
    Aug 2009
    Posts
    8

    Re: No listbox "list" property and related problems

    I got the word file to load, but still cannot get the combo box data to load. I just don't know what I'm doing and there is no "list" property on the combobox properties.

  4. #4
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,873

    Re: No listbox "list" property and related problems

    Are you using Word, or VB6? You need to show some code (plus the screen print from before)
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Aug 2009
    Posts
    8

    Re: No listbox "list" property and related problems

    Hello thank you.

    I am launching VB from word but using VB6.3. This is the code to change text.

    This is ugly because I have changed it a few times. this code find the text string and replaces it with ""...ie nothing/null. So that part is working.

    I think I am not declaring my variables right to capture the input data...? Here is the code for this now:


    (see post below for code)
    Last edited by tunetown11; August 16th, 2009 at 01:42 PM.

  6. #6
    Join Date
    Aug 2009
    Posts
    8

    Re: No listbox "list" property and related problems

    please see next post. thanks
    Last edited by tunetown11; August 16th, 2009 at 10:22 PM. Reason: Ridiculous sample of code

  7. #7
    Join Date
    Aug 2009
    Posts
    8

    Re: No listbox "list" property and related problems

    Attached is the screen print...this is what main problem is...the is no "List" property for my combo box and I can't seem to write code that will load the data into the drop down list.
    Attached Images Attached Images  
    Last edited by tunetown11; August 16th, 2009 at 10:22 PM.

  8. #8
    Join Date
    Aug 2009
    Posts
    8

    Re: No listbox "list" property and related problems

    Looking for answer to previous post...thanks
    Last edited by tunetown11; August 16th, 2009 at 10:22 PM. Reason: Rewriting code

  9. #9
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,722

    Re: No listbox "list" property and related problems

    Even if the List property is not accessible throu the property sheet, it is present.
    Yo can do:
    Code:
    ComboBox1.AddItem "Item1"
    x = ComboBox1.List(0)
    When you examine x it contains "Item1"

Tags for this Thread

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center