Hi everybody,
I am desperate to get this simple task sorted. I am new to VBA but somehow have managed to sort out some more complicated issues than this one but on this I am sooooo confused.
Basically, I have a spreadsheet that I open up and use as a blank form. I fill in the details and save it over itself so I have a copy of the last form information when I reopen it. It acts as a template as it has an autonumber that is used to generate an invoice number. So when the workbook is reopened the next invoice number is generated but the previous invoice details are in there just in case I forgot to print it.
What I also need to do is have a copy of each invoice saved as a seperate file so that I have a seperate copy of it but.... whenever I get help on the SaveCopyAs method, it seems to request that I have to put a filename in but I won't know what that is until I've done the invoice as I want to take the information from 2 fields within the worksheet i.e. Customer Name and Invoice Number cells.
If anyone can actually understand what the heck I am talking about I would be soooooo very grateful for any help.
So in Summary:-
I need to Save a copy of the open Workbook as a different name completely but the options have to be totally variable. CAN ANYONE HELP PLEASE?
Thanks a million.
Yve
I am desperate to get this simple task sorted. I am new to VBA but somehow have managed to sort out some more complicated issues than this one but on this I am sooooo confused.
Basically, I have a spreadsheet that I open up and use as a blank form. I fill in the details and save it over itself so I have a copy of the last form information when I reopen it. It acts as a template as it has an autonumber that is used to generate an invoice number. So when the workbook is reopened the next invoice number is generated but the previous invoice details are in there just in case I forgot to print it.
What I also need to do is have a copy of each invoice saved as a seperate file so that I have a seperate copy of it but.... whenever I get help on the SaveCopyAs method, it seems to request that I have to put a filename in but I won't know what that is until I've done the invoice as I want to take the information from 2 fields within the worksheet i.e. Customer Name and Invoice Number cells.
If anyone can actually understand what the heck I am talking about I would be soooooo very grateful for any help.
So in Summary:-
I need to Save a copy of the open Workbook as a different name completely but the options have to be totally variable. CAN ANYONE HELP PLEASE?
Thanks a million.
Yve