+ Reply to Thread
Results 1 to 5 of 5

Adding A Blank Row To A Table In Error

Hybrid View

  1. #1
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Adding A Blank Row To A Table In Error

    This code is adding a line to the second table every time the enter transaction button is clicked.
     Set table_object_row1 = table_list_object1.ListRows.Add
    It is in your CommandButton1_Click subroutine.
    BTW - if you don't know how to trace through your code, line by line and by using break points, you should learn. It helps in this type of issue.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  2. #2
    Forum Contributor
    Join Date
    04-23-2014
    Location
    Liverpool...ish
    MS-Off Ver
    Excel 2013
    Posts
    126

    Re: Adding A Blank Row To A Table In Error

    Thank You for your reply. This was another good learning moment. I had used debug, or at least my limited understanding of its capabilities, to no avail. Knowing the offending code lead me to apply a break point their so I could see it add the line. My question is, if you don’t mind, how do you apply a systematic approach to using debug that leads you to this line?

    I have stripped out many functions and lines of code to provide this example…(My coding is at best, my attempt to learn VBA and at worst a mishmash of code that I have gotten from the internet that I have slim knowledge of how it functions. Neither of which represents a clear style or approach.) The original would have been more difficult to weed through so a little insight into how you approach the problem solving process would be of great benefit.

    The solution to this problem…. Or at least what I did that worked, was to move that line of code to the If statement which adds data to Table 2. Is that a proper fix or should I have declared something different at the beginning?

    Thank You again…. One day, I might be able to answer questions…. But not for the foreseeable future.

    Best Regards
    Scott

+ 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. Adding blank column to Pivot Table
    By GPSPOW in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-09-2014, 04:06 PM
  2. Adding to first blank row in table
    By Janno in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2014, 07:07 AM
  3. Sorting table then adding blank rows
    By kgrula in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2011, 11:05 PM
  4. Replies: 3
    Last Post: 09-17-2008, 01:05 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