Closed Thread
Results 1 to 5 of 5

Error...When pulling data from worksheet to UserForm

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

    Error...When pulling data from worksheet to UserForm

    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 TextBox's as follow:

    ComboBox1.......Select Year
    ComboBox2.......Select Batch
    TextBoxYear........Showing Year
    TextBoxBatch...... Showing Batch number
    TextBox1 ........... Showing Month 1 data
    TextBox2.............Showing Month 2 data
    TextBox3...............Showing Month 3 data
    .
    .
    .
    .
    TextBox12...........Showing Month 12 data



    It shows data correctly in UserForm1 for TextBoxYear, TextBoxBatch and TextBox1 to TextBox7 but when it reaches TextBox8 (Month 8) it give error "Could not get Column property, Invalid argument"

    and it does not show data in TextBox8 (Month 8) .......to..........TextBox12 (Month 12) and give error in code from
    ".TextBox8 = ListBox1.Column(10)"

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

    Please Login or Register  to view this content.
    Please Help
    Kind Regards

    z-eighty2
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Error...When pulling data from worksheet to UserForm

    Isn't this the same problem for which there is a thread started few days ago and which is answered by Norie?

    www.excelforum.com/excel-programming-vba-macros/986780-could-not-get-the-column-property-invalid-argumnet-error-plz-help.html
    If you are pleased with a member's answer then use the Star icon to rate it.

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

    Re: Error...When pulling data from worksheet to UserForm

    Hi Buran!

    It is almost the same problem but a little bit differnce.

    In the thread posted few days ago, In that Userform the Data was searched by using a single ComboBox "Select Batch".


    But in today's thread, In the Userform1 the data is searched by using 2 ComboBox's. "Select Year" and "Select Batch" which pulls data from worksheet to ListBox1 (UserForm1)

    but when it is clicked in the listbox1 to show data in Textbox's it gives error.

    If you see my attached workbook above it would explain better.

    Plz help

    Kind Regards
    z-eighty2

  4. #4
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Error...When pulling data from worksheet to UserForm

    z-eighty2 ,
    A minor tweak of the UI doesn't make it a different problem, as long as it is irrelevant to the listbox (where your problem is) and the limitations you have when using AddItem method.
    From the other thread:

    Quote Originally Posted by Norie View Post
    You can't populate a listbox with more than 10 columns using the AddItem method.

    Since you are only displaying one column in the listbox why not just populate that one column.

    Then take the data for the textboxes from the worksheet instead of the listbox.


    So you are still trying to put more than 10 columns of data in the listbox.

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Error...When pulling data from worksheet to UserForm

    Quote Originally Posted by buran View Post
    z-eighty2 ,
    A minor tweak of the UI doesn't make it a different problem, as long as it is irrelevant to the listbox (where your problem is) and the limitations you have when using AddItem method.
    From the other thread:
    Thanks buran!

    So.

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 11-26-2013, 05:42 PM
  2. Replies: 0
    Last Post: 05-20-2013, 10:09 AM
  3. [SOLVED] VBA Userform Pulling data from txt file
    By TalResha in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-18-2012, 08:33 AM
  4. Error Pulling Data
    By sujitshukla in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2010, 11:04 AM
  5. Word userform pulling data from Excel
    By Freaky_zoid in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 04-02-2009, 05:38 AM

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