+ Reply to Thread
Results 1 to 4 of 4

UserForm to Spreadsheet - Cannot get data to go to the next empty line.

Hybrid View

  1. #1
    Registered User
    Join Date
    01-27-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    UserForm to Spreadsheet - Cannot get data to go to the next empty line.

    I am not sure what I am doing wrong, I am new to UserForms but I've done a few and they worked fine. I'm trying a new one where I am entering in data into the userform and having it populate into a spreadsheet. I have using the following code, and it is either making the next line go way down the worksheet or it's overriding something already in the worksheet. What am I doing wrong? I have attached the files. The code I am using is, " emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1" Which works for other sheets, but not this one...

    Reason: I am creating baselines for a manufacturing production line. I have the first tab have the printable baseline. I have the second tab with all the data and the userform. The idea is that the userform populates the spreadsheet, and then the operator can use the baseline sheet to type in the blueprint number and have the information pop into that printable sheet. Previously, we did all this without the userform and I just input the data for the operators - but if I can have the operators input it into the userform that saves a huge step.
    Attached Files Attached Files

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

    Re: UserForm to Spreadsheet - Cannot get data to go to the next empty line.

    for first empty row I'd use
     emptyRow = Worksheets("Baseline Data").Range("A" & Rows.Count).End(xlUp).Row + 1
    your formula counts non-blanks, but you do have some blanks in column A at the top, so it would result in a row a few above the actual last row.
    Last edited by Arkadi; 03-03-2017 at 03:37 PM.
    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.

  3. #3
    Registered User
    Join Date
    01-27-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: UserForm to Spreadsheet - Cannot get data to go to the next empty line.

    Perfect! As soon as I changed the 'A' in your code to 'C' it now does everything I need. Thank you!

  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: UserForm to Spreadsheet - Cannot get data to go to the next empty line.

    Happy to be of use

+ 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 not saving to next empty row on spreadsheet
    By katiedee1625 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-31-2017, 03:36 AM
  2. Excel Userform-Check if line 3 is empty
    By HyperChicken in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2015, 09:37 AM
  3. Have UserForm know to switct line if data on line 1 and so on
    By Jp4Real in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2015, 08:50 AM
  4. [SOLVED] Need help in code to add save data from userform to next empty line in excel
    By MedSter2015 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-23-2014, 01:51 AM
  5. [SOLVED] If one cell in line turn empty then entire line turns empty
    By Cristy0505 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-19-2013, 06:02 AM
  6. Macro copy data to next empty line (help please)
    By pepijn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2012, 12:11 PM
  7. Userform add line of data, clear form add next line of data
    By CRIMEDOG in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-11-2010, 11:05 AM

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