I'm having a problem trying to save multiple worksheets into new files. With values only, if possible, which is not for VBA newbie like me I guess.
This master workbook is called "Form.xlsm". It has 4 certain sheets I want to save into a new separated file for each sheet. They are "Invoice", "WInvoice", "Bill" and "WBill".
The method to save is clicked a button on the userform and then those 4 sheets will be saved into new files. With values only, no formula, no macro and keep all the formats of course.
The button is "CommandButton2".
This button actually has another job. It is to update a customer's order to "CAccounting.xlsx", as you may be noticed below, and this works fine. But if this, any code actually, causes a problem and has to be changed then feel free to let me know.
For further explanation about the 4 sheets. All data filled in userform will be input to "Invoice". "WInvoice", "Bill" and "WBill" just use "Invoice" as a reference instead.
All of them have formulas like "sum" and "VLOOKUP" etc. other than "=" they use to get a reference from "Invoice".
And the last thing, don't know if necessary, those formulas, like "VLOOKUP", refer to hidden sheets in the master workbook.
Here's the code I came up with. It did not work:
However, if I remove these 4.
And enter this instead.
It works.
Though it will only save "Invoice" into new file, and still has formulas and macros inside.
I hope I did explain clear enough. Thanks.
Bookmarks