+ Reply to Thread
Results 1 to 6 of 6

Userform: one row added to wb, need to add new row if required (by previous row)

  1. #1
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Userform: one row added to wb, need to add new row if required (by previous row)

    Sorry for the confusing title, don't know how to say it.
    I have a Userform that helps choose parts to add to an order.
    Once you choose a part, sometimes it requires another part to be added.
    I have a column that lists the required part Column K on the entry form.
    I have added the code after 'check for required accessories.
    Please Login or Register  to view this content.
    I am getting an error on the line:
    Please Login or Register  to view this content.
    I am including the workbook.

    Also is there a way to add more that one item to check in a cell (seperated by a comma or semicolon)?
    Attached Files Attached Files
    Last edited by CRIMEDOG; 12-13-2010 at 12:27 PM.

  2. #2
    Registered User
    Join Date
    12-09-2010
    Location
    Essex, England
    MS-Off Ver
    Excel 2002
    Posts
    41

    Re: Userform: one row added to wb, need to add new row if required (by previous row)

    What have you dim'd c10 as? You're trying to set it to be a string?

    What's the value of jRow at that line?

  3. #3
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Userform: one row added to wb, need to add new row if required (by previous row)

    Dim c10 as Range
    Hopefully jRow is the last row of data on the Wsheet "Entry"

  4. #4
    Registered User
    Join Date
    12-09-2010
    Location
    Essex, England
    MS-Off Ver
    Excel 2002
    Posts
    41

    Re: Userform: one row added to wb, need to add new row if required (by previous row)

    try Set cl0 = ws.Cells(jRow, 11) instead?

  5. #5
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Userform: one row added to wb, need to add new row if required (by previous row)

    That helped!
    Now it select the right Cell to check for required Part - BUT it Jumps to the Clear subroutine even though the cell does not =""
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Userform: one row added to wb, need to add new row if required (by previous row)

    Ok - I added the end sub statement, now it works like a charm!

+ 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