I have been working on a invoice spreadsheet in Libre Office Calc. Im almost done but I have a few tasks left to complete before its where I want it. I have used the Macro recorder to get most of what I need done but Ive reached a point where I need some help, and the syntax of the recorder does not look like the typical VBA scripting.

  1. I want to be able to save the work sheet with the days date in XX-XX-XXXX format and append the invoice number to that (In cell C9) so that the saved filename looks like XX-XX-XXXX_invoiceno.ods

  2. I have not been able to find any examples, but can someone help with the macro code needed to close the workbook once it is saved.

  3. Finally, Id like to get a message box at some point (either after the sheet closes or just before it does, doesnt matter really) that shows me where the file was saved and what the file name is (just as confirmation for me more than anything).

I have put the code together from recording on how to reset the invoice template to be ready for a new sale. In addition I made a special template that is formatted (page, font, font size, etc) to open up and paste into. I was able to do a macro record and get the code to copy the invoice, open the new sheet and paste into the new sheet without copying over the functions, but have not worked out how to save and close the sheet from there. My invoice template has several tabs on it and I just want to save the invoice, not the whole thing and that was the only way I could come up to do it.

At any rate, thats the gist of what I am needing help with at this point.

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.