+ Reply to Thread
Results 1 to 11 of 11

run time error 424, Object required

  1. #1
    Forum Contributor
    Join Date
    07-17-2011
    Location
    PH
    MS-Off Ver
    Excel 2007
    Posts
    183

    run time error 424, Object required

    Hi,

    I have a userform with 5 textboxes and userform. i have to fill the listbox populated from textbox. Upon triget the button to transfer the data i got an error
    Run time error 424, object required. the error poin to x= listbox1.listcount

    May I ask your help guys. thanks.


    Here is my macro codes

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: run time error 424, Object required

    Hi,

    Could you please upload your workbook to help me assist you with this problem.

    Thanks

  3. #3
    Forum Contributor
    Join Date
    07-17-2011
    Location
    PH
    MS-Off Ver
    Excel 2007
    Posts
    183

    Re: run time error 424, Object required

    Thansk for reply.

    Fixed the error. the problem is the txtbox1 which it should be textbox1.
    Anyway, how ccould i put a column header in my listbox?

    here is my code
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: run time error 424, Object required

    Hi,

    Your ColumnWidths property requires semi-colons to delimit each width value. Your last 3 columns are separated by commas.

    Let me know if this fixes it

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: run time error 424, Object required

    I have attached the proper code for creating a multi-column listbox on a userform

  6. #6
    Forum Contributor
    Join Date
    07-17-2011
    Location
    PH
    MS-Off Ver
    Excel 2007
    Posts
    183

    Re: run time error 424, Object required

    THank for your reply.
    Based on your sample, you ahve used the rowsource that populate from sheet1 with correspoding column header.
    What if i need to removed/delete an items from listbox? Just want to know if the data from sheet1 will be removed or deleted.

  7. #7
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: run time error 424, Object required

    Here is where you have to make a trade-off:
    1. Using the RowSource property means that you won't be able to delete a row in the ListBox. This means that your data remains unaffected
    2. To allow row deletion, use the List property instead. However, you cannot get Column Headers in the ListBox without the RowSource property.
    So you have to decide what is more important to you...row deletion or column headers.

    At least that is my understanding of how it works.

    Perhaps you could try using a ListView control instead of a ListBox???

    To enable the ListView control, open your UserForm in the VBE and go to Tools --> Additional Controls --> select Microsoft ListView Control, version 6.0 --> click OK.

    I hope this works out better for you instead

  8. #8
    Forum Contributor
    Join Date
    07-17-2011
    Location
    PH
    MS-Off Ver
    Excel 2007
    Posts
    183

    Re: run time error 424, Object required

    Hi ajryan,

    sorry for my late reply and thanks for your time to reply. I have made some adjustment and its already working. the error i got is because of wrong spelling and at the same time i use a row source property. my last concern is how could I save my final transaction where the listbox items will be transfer to my worksheet as my main database. sheet name is TransationDB. i will transfer listbox items to the last empty row. thanks.

    THis is my code populating textbox to lisbox.
    Please Login or Register  to view this content.

  9. #9
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: run time error 424, Object required

    Hi, no worries

    Try this code:
    Please Login or Register  to view this content.
    I have attached my original workbook with the ListBox to give you a demonstration of this code working. Note that you can populate the columns with a loop rather than an individual of code for each column, as you have a lot more than 3 columns like in my example.

    I hope this helps

  10. #10
    Forum Contributor
    Join Date
    07-17-2011
    Location
    PH
    MS-Off Ver
    Excel 2007
    Posts
    183

    Re: run time error 424, Object required

    Solved. Thank you very very much! two thumbs up!
    Lot more to learn. its very big help for me of this forum.

  11. #11
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: run time error 424, Object required

    You're welcome!

    Please don't forget to mark this thread as solved, and please click on the * next to my post to say thanks and add to my reputation

+ 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. [SOLVED] Simple Calendar pop up macro --> error Run-time error '424': Object required
    By am_hawk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2013, 10:38 AM
  2. VBA - “Run-time error 424: object required”
    By randiba in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-23-2013, 07:28 AM
  3. Run-time error 424.. object required
    By techteam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2012, 07:01 AM
  4. Run Time error 424 Object Required
    By Casey in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-12-2006, 02:51 PM
  5. Run-time error '424': Object required
    By ez_cali in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-21-2005, 03:52 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