+ Reply to Thread
Results 1 to 8 of 8

Error! Could not get the column property, Invalid argumnet

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    pakistan
    MS-Off Ver
    Excel 2007
    Posts
    89

    Error! Could not get the column property, Invalid argumnet

    Hello EveryOne!

    I have got a UserForm which pulls data from Excel sheet and show it on UserForm.

    UserForm1 has One ListBox name "ListBox1" and Thirteen TextBox's.

    TextBoxBatch...... Showing Batch number
    TextBox1 ........... Showing Year 1 data
    TextBox2.............Showing Year 2 data
    TextBox3...............Showing Year 3 data
    .
    .
    .
    .
    TextBox12...........Showing Year 12 data



    It shows data correctly in UserForm1 for TextBoxBatch and TextBox1 to TextBox9 but when it reaches TextBox10 it give error "Could not get Column property, Invalid argument"

    and it does not show data in TextBox10 (Year 10), TextBox11 (Year 11), and TextBox12 (Year 12).

    Here is code and I have alos attached workbook with userform.

    Please Login or Register  to view this content.
    Plz Help..I would be very thankful.

    Kind Regards
    z-eighty2
    Attached Files Attached Files

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Error! Could not get the column property, Invalid argumnet

    Listbox seems to be limited to 10 culumns.
    In this thread an alternative with Listview is discussed: http://www.excelforum.com/excel-prog...than-10-a.html.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Error! Could not get the column property, Invalid argumnet

    Why are you populating a one column listbox with multiple columns?
    If posting code please use code tags, see here.

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Error! Could not get the column property, Invalid argumnet

    Listbox is only limited to 10 columns if you will use AddItem to populate it. If you create an array and assign this array to the List property, you may have many more columns.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Error! Could not get the column property, Invalid argumnet

    Izandol

    The OP's code sets the column count to 1, so why populate it with multiple columns the user can't see?

    It would be easy enough to pull the data from the worksheet to populate the textboxes.

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Error! Could not get the column property, Invalid argumnet

    I think it is easier to store the data in the listbox to populate the textboxes for the selected record.

  7. #7
    Registered User
    Join Date
    02-22-2013
    Location
    pakistan
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Error! Could not get the column property, Invalid argumnet

    Hi Izandol,

    Thanks for your reply.I am new to VBA, can you please edit my code which I have posted before so that I would be able to solve this problem.

    I would be very thankful to you.

    Kind Regards
    z-eighty2

  8. #8
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Error! Could not get the column property, Invalid argumnet

    For example:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Could not get the column property, Invalid argumnet Error? Plz Help
    By z-eighty2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2014, 06:32 PM
  2. Run-time Error '380': Could not set the RowSource property. Invalid property value
    By Rem0ram in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-26-2013, 03:57 PM
  3. [SOLVED] Excel run-time error '381': Could not set the List property. Invalid property array index
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-20-2012, 12:48 PM
  4. Replies: 2
    Last Post: 06-11-2012, 03:03 PM
  5. Runtime Error 380 – Could not set the list property. Invalid property value
    By BernzG in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2005, 05:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1