PDA

View Full Version : Inserting sheets at end, which contain a template to get completed



u_dakka
10-08-2008, 01:40 PM
What I'm basically after is trying to code such that a form pops up requesting completion. When you complete the form and hit enter, it takes a table and then completes the relevant sections using the data gathered on the form.

I'm currently getting it to complete the form by using bookmarks, but obviously that wouldn't work if a new page was copied in as surely the bookmarks would be exactly replica's of the original, making the data be inserted at every point with that bookmark. Is that right?

Firstlly, what would be the method of automatically inserting a page at the end with the copied section in it?

I'd be grateful for all the help I can recieve.

Thanks
Andy

lucas
10-09-2008, 06:27 PM
Andy, You should look at using a template.
Here are a couple of threads that might interest you.

multiple templates in one template file (http://vbaexpress.com/forum/showthread.php?t=13543) Start on post #6

Using bookmarks for data input (http://www.vbaexpress.com/forum/showthread.php?t=11427)

u_dakka
10-10-2008, 09:58 AM
I dont want to use templates it needs to be a cumulative document, i.e. the sheets get added to a document at the end to make the document bigger. The project is because we're spotting errors, everytime we spot an error we have to fill out a form about the error. The forms are stored in one document which then is submitted to the client. I'm thinking of writing a macro because we'll be writing a few hundred of these forms over the course of the project, all to a common format.

lucas
10-11-2008, 09:38 AM
Well, this one copies the last page on the document when it is opened and that means there must be a blank form there with the bookmarks required.

It then lets you fill out the form and when you hit the submit button it enters the data into the form, deletes the bookmarks and then pastes the blank form in at the end of the document.

I think this might be easier if you tried to insert a page from a template and I will look into that if I have time.

Let me know if this is close to what you are looking for. It has one caviot and that is the last page will always be your blank form.....