+ Reply to Thread
Results 1 to 8 of 8

Why does the information from my userform ends up underneath the table

  1. #1
    Registered User
    Join Date
    03-23-2014
    Location
    Utrecht
    MS-Off Ver
    Excel 2011
    Posts
    8

    Why does the information from my userform ends up underneath the table

    Hi there,

    I created a working userform but I can't figure out why the inserted information ends up underneath the table instead of ending up in the highest free row like I meant to.

    I included the workbook for a better view of things.

    Hope you can help

    Opzet administratie (versie 1).xlsm

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Why does the information from my userform ends up underneath the table

    I'm not sure if I understood correctly, however, I believe that this line
    Please Login or Register  to view this content.
    will take you to the first free row below the table. Try this instead:
    Please Login or Register  to view this content.
    where 'LastRow' should correspond to the first free row in your table.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    03-23-2014
    Location
    Utrecht
    MS-Off Ver
    Excel 2011
    Posts
    8

    Re: Why does the information from my userform ends up underneath the table

    It doesn't really work. Now it gives another error. 'With isn't set'.

    Here is what I did.

    Private Sub cmdVoegToe_Click()
    Dim ws As Worksheet
    Dim addto As Range
    Dim LastRow As Long

    Set ws = Blad2
    LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Why does the information from my userform ends up underneath the table

    BobdeB,

    The problem with your original code is that the cells with the table in them don't get recognized as blank. Im not sure exactly what is wrong with Mumps1 code, since i don't know what range of cells are being searched, but possibly column A. Since there are no populated cells in that column, it returns an error. Leaving all your dim as it is, and leaving the ws = Blad2, try these 2 lines:

    Please Login or Register  to view this content.
    That includes the header in column B for the search, and then takes the next line after the last line with data. Will this work? Veel Geluk!
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

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

    Re: Why does the information from my userform ends up underneath the table

    Why do you have all those blank rows in the table?

    If you didn't you could add directly to the table.
    If posting code please use code tags, see here.

  6. #6
    Registered User
    Join Date
    03-23-2014
    Location
    Utrecht
    MS-Off Ver
    Excel 2011
    Posts
    8

    Re: Why does the information from my userform ends up underneath the table

    Opzet administratie (versie 1).xlsm

    Thank you guys for your help so far. The last solution brought up another problem. Error 91. I included the file for you guys to look at. I have the feeling i'm so close to a working form but I am really new at this, so it's hard to figure out on my own. Therefor, in advance, you guys rock.

    Can anyone help me with this?
    Last edited by BobdeB; 03-25-2014 at 07:25 AM.

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Why does the information from my userform ends up underneath the table

    BobdeB, This line of code:

    Please Login or Register  to view this content.
    does not specify the worksheet. add "ws." before Range, like this:

    Please Login or Register  to view this content.

  8. #8
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Why does the information from my userform ends up underneath the table

    I guess this issue is resolved??

+ 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] Userform ends but still running
    By danjim02 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-12-2013, 08:48 AM
  2. [SOLVED] Writing table entries underneath each other
    By dannyjoer in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-12-2013, 03:25 AM
  3. Coding a button in an Excel UserForm to add information to a summary table worksheet
    By champita in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2012, 01:24 PM
  4. Chart and Table information in Userform
    By SQChevy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-08-2008, 05:58 PM
  5. Copy & Paste a row underneath the last one in the table
    By BouncingHippo in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 01-28-2008, 08:30 PM

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