+ Reply to Thread
Results 1 to 7 of 7

userform adds extra row whwn entering data

  1. #1
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    userform adds extra row whwn entering data

    hi
    my userfom enters a partial extra row when entering data,i have added code to delete which sometimes works and sometimes does not,has any one any ideas why this should be,entries from scan in goes to sheet3 ,where i have left the partial row in,im lost as to why it does this,any help would be good
    cheers colin
    Attached Files Attached Files
    Last edited by cfinch100; 05-30-2013 at 02:27 PM.

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: userform adds extra row whwn entering data

    HI,

    Your main problem is the "cmdAdd". It calls the Command_Click3" too may times.(and other command clicks)
    I think you need to rethink how you want your code to work.
    If the "cmdAdd" is to load sheet 3 and you are wanting to go thru the "Id" you should set a "Loop" that will
    look at each combobox in the "Id" until it see a box with out data.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  3. #3
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: userform adds extra row whwn entering data

    hi charles
    i added a new commandbutton1 top left,this added all command buttons together like in frmret how you showed me but it still happens,not sure about how to construct the loop correctly but will look at some threads and try to get some ideas,thanks for the info though, many thanks
    cheers colin

  4. #4
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: userform adds extra row whwn entering data

    hi charles
    no luck at min for loop, not sure what you mean by command_click3 called too many times can only see it once at beginning or am i missing something,
    it is supposed to loop through all command buttons until it gets to an empty box,and then send to sheet3, suppose could use comboboxes and if empty exit sub,is it along them lines,will keep looking and trying
    cheers colin

  5. #5
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: userform adds extra row whwn entering data

    Hi,

    I revised this code so that it looks at the "Comboboxes".
    Also note how I formated the code. This makes it easier to read.
    Also you should not use names like this "CommandButton11_Click" for the call.
    This give you the impression it's actually a command button.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: userform adds extra row whwn entering data

    hi charles
    thats brilliant thanks ,had done very similar myself with comboboxes but for some reason did not work
    thankyou once again think i get it now
    cheers colin

  7. #7
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: userform adds extra row whwn entering data

    hi charles
    have been testing and if you enter barcode in first 2 boxes in frmissued,then return them in frmret it leaves first record in sheet3,but if you fun frmret with nothing in boxes it sends to sheet4 as should have done first time ,any thoughts please
    cheers colin

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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