PDA

View Full Version : Solved: Macro/ Cell referencing and separate sheets



DarkCrystal
09-22-2008, 10:08 AM
The project I am working on has two sheets. Data from Sheet1 is pulled from data entered into Sheet 2. A user enters info into Sheet2 (named Template) which is an expense report form.

What I am trying to do is create a macro that will copy Template and move the copied sheet to the last sheet. With the copied Template, Template(2), I want the user to be able to fill in Template(2) and have the needed fields sent to Sheet1. There will be several copies of Template with each new expense report filled out, or Template(3), Template(4), ... ,Template(n). The info from Template(3) will go to Sheet1, one row down (next available row), and so on with each new copy of Template created. The fields in Sheet1 are "Purchaser", "Vendor", "Cost", "Code", "Date".

That is it. Wrapping up, by running the macro, Template will be copied to create a new form and the info entered into it will go to Sheet1. Run the macro again and a second copy of template will be created and the info entered will go to Sheet1 into the next row. And so on.

Nicholas

MaximS
09-22-2008, 04:36 PM
Hi I've made you a sample file which should meet your expectations.

Every time you open it pop-up will populate asking if you want to add new data. If YES is clicked then new sheet with form will be added.

Then after filling the form and clicking close (that can be changed to clicking save or to code attached to command button) content of the form will be coppied into Sheet1 (for now named Summary).

See attached file add your form and writte if thats OK.

DarkCrystal
09-22-2008, 05:30 PM
That's interesting. I like it. Can the Yes/No form work in such a way that I can run it again without having to close and re-open the file each time I want another 'Temporary' sheet added, e.g., if I wanted to add more than one 'Temporary' sheet per session?

MaximS
09-22-2008, 07:25 PM
try now, newer, better version ;)

DarkCrystal
09-22-2008, 07:31 PM
That's great! Thank you.

mdmackillop
09-23-2008, 06:27 AM
Please remember to mark your thread as Solved using the Thread Tools dropdown.