+ Reply to Thread
Results 1 to 9 of 9

Adding data to ListObject fails

  1. #1
    Registered User
    Join Date
    05-12-2011
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    5

    Question Adding data to ListObject fails

    Dear Experts,

    I have little experience with VBA and believe I am stuck on a basic level. I like to read a set of columns in a row and add the read data to a specific table. The value in one of the columns decides to which table the data should be added.

    I manage to create a table but I am unable to insert/add the copied data. Could someone help me? Find below a snippet of the test code:

    Please Login or Register  to view this content.
    ---
    My original (unanswered) post can be found here. the post is copied to the following two boards: mrexcel and worksheet.nl

    If my question is answered on any of the forums I will update ALL posts.
    Last edited by lmolenaar; 05-12-2011 at 05:33 AM. Reason: Solved issue

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,018

    Re: Adding data to ListObject fails

    Hi, and welcome to the forum.

    Unfortunately:

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Read this to understand why we ask you to do this.

    Please add links to all your related posts in other forums.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    05-12-2011
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Adding data to ListObject fails

    Hi romperstomper, was just working on adding these links, as you can hopefully see when looking at the edit timestamps. Am I still at violation?
    Last edited by romperstomper; 05-12-2011 at 03:39 AM. Reason: remove unnecessary quote

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,018

    Re: Adding data to ListObject fails

    Technically yes - you should provide links to all your cross posts, not merely the first one you made (especially as that one is in Dutch and most people won't be able to follow it!), so that we can also see what has been suggested elsewhere, even if it didn't work for some reason.

    Also, there's no need to quote a post you are replying to if it's the one immediately before your response.

  5. #5
    Registered User
    Join Date
    05-12-2011
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Adding data to ListObject fails

    3rd time a charm?

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,018

    Re: Adding data to ListObject fails

    Perfect thank you!

    Do you have a sample workbook you can post - it will save people attempting to recreate your problem from scratch?

  7. #7
    Registered User
    Join Date
    05-12-2011
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Adding data to ListObject fails

    I am learning on the fly. it seems a range cannot be directly inserted into a table. I needed to cycle through each range value and add it one by one. See code change below:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Adding data to ListObject fails

    The same result:

    Please Login or Register  to view this content.



  9. #9
    Registered User
    Join Date
    05-12-2011
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Adding data to ListObject fails

    Thanks snb, will test your code as well

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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