Make an unsaved file copy in memory?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all. I am using VBA in Excel XP and Win 2k. Please help me if you can. Sorry for the length
I have a program structured as follows:

1. User opens a program file

2. An "on open" event then opens a template form file located elsewhere on the network (in a more secure location); The key is to keep the original template form unchanged by the user.

3. User can complete this form and click a "submit" button which: causes a program to increment a form counter and place a unique serial number on the form, saves the form in a specific location, and notifies the approver that a form is ready for review and approval

4. OR, the user can at any time, close the form without saving it (i.e. cancel). Since the "submit" button was not clicked, the form never receives a serial number (i.e. no skipped numbers) and is not saved

HERE IS THE QUESTION
I can do all of this already, except the part where a copy of the template form is opened for the user into memory. This would be as though a new unsaved Excel file were just opened, but not yet saved. Make sense? Is this even possible

The template contains a single visible sheet and two "very hidden" sheets, programs, and spreadsheet controls and would not receive a form number until the user saves it by clicking the "submit" button

Please help with this if you can or post back questions if my description is unclear. Thank you very much in advance for your assistance.
 
I am not convinced I understand the problem. BUT ..
If you want Excel to behave as if the activeworkbook had not been saved, se

ActiveWorkBook.Saved = Fals

Or if you want Excel to behave as if the workbook had been saved, se

ActiveWorkBook.Saved = True
 
Hi AA2e72E

Thanks for reply, but if I use "ActiveWorkBook.Saved = False" and the user clicks the "Submit" button, the program will save the currently active template file

Will this not cause my template file to be overwritten with a now completed form

I want the user to have access to a COPY of the original form (that is not yet saved)...can do?
 
I'm confused, by default isn't a template just that: copies of the original. The template should not change!
 
Is this a true template form with an *.xlt* extension? If I am no
mistaken, once the template is filled out and saved, it is saved wit
an* .xls* extension. This will keep the original *.xlt* form intact.



Rolli
 
Aha! Good point. Thanks to all who responded

My "template" is currently saved as an xls, I need to convert to an xlt.

Somehow, this concept totally slipped my mind

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top