Copying Data To A List

  • I am trying to copy data from a form and pasting it into a list. Every new form I create will have data copied to the list, in the next blank cell down.


    There are six fields on my form that I want to copy but these fields do not always have data in them. The field that is copied into the first column of the list will always have the date in it.


    How do I get the macro to select the next free cell in column A and past the data into the respective cells in that row?


    The code I have written so far is as follows:


    Also, should I be splitting this into smaller macros and calling them in another macro? Will this speed the process up?


    Any assistance is appreciated.
    Duncan

  • Re: Copying Data To A List


    Splitting the code shouldn't make any difference.
    You seem to be creatg a job sheet from a Template workbook, then adding information from a UserForm. Where does this form gt the correct information from?
    It seems over complicated to me. Why not have the Job sheet as a template sheet within the job register and fill it in, save the data to the register. Then if you really need to save the job sheet as a new workbook - although I would never do that - all the data is in the register so a duplicate can be created when needed.

  • Re: Copying Data To A List


    Thanks for your comments. The reason I have created it in this format is so I can email the completed job sheet to clients and save them electronically.


    In my form I have a combo box of clients and several text boxes for fields such as order number, site contact name and number, etc. The combo box is populated from our client list which will eventually be moved into the job register workbook.


    The job sheeet is then filled out when the job is complete and a copy sent to our clients with the invoice. This could be completed by one of several people, whereas the original job sheet and entry in the register is completed by one person only. The job register is our master record of all jobs carried out. I realise that occasionally I am going to have to alter the code to save the job report as a higher number so I can archive some of the reports, but that's a small price to pay.


    I'm not sure I understand what you mean by "Why not have the Job sheet as a template sheet within the job register and fill it in, save the data to the register."

  • Re: Copying Data To A List


    I mean have the sheet to fill in as a form in the register workbook, fill it in, save the relevant data to the register. Then save a copy of that sheet only, which can be printed or emailed.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!