Skip to main content main content
Sharing Is Caring! We do appreciate your efforts to let others know us!

Screenshots and Images

The printed version.

Advanced Sample - Email Is Required Before Saving Invoice

Advanced Sample - Email Is Required Before Saving Invoice (c5103)

c5103 now includes the customized invoice template for the latest version of Uniform Invoice Software. This is what you will see when you open advanced-invoicing-sample-email-is-required-before-saving-invoice.xlsm.

Advanced Sample - Email Is Required Before Saving Invoice (UIS Edition)

Advanced Sample - Email Is Required Before Saving Invoice - UIS edition


License: Private Use (not for distribution or resale). See our Terms of Use.

You are safe to download the resources. We've added our digital signatures to the files.


Without database file. How to download and use

659 KBDownload

Download this if you have already installed UIS, but are looking for additional customized templates.

948 KBDownload

Download this if you want this design to be set as the default template by the installer program.

3.78 MBDownload


Starting from Uniform Invoice Software version 5, a new Excel add-in module "Uniform Invoice Software Helper" was introduced to provide functions for the Excel on-sheet buttons on the Invoice and report worksheets. This sample demonstrates how you can call the action procedures from your own macro.

In Advanced Invoicing Sample - Macro-Enabled Invoicing Template (c5101) we looked at how to make your invoice template a macro-enabled template, and provided information and resource links involved, such as Office / Excel security settings, digital signature, etc. In Advanced Invoicing Sample - Invoiced Total in English Words (c5102), we provided a practical example implemented as a macro-enabled invoicing template, i.e. a user-defined Excel formula / function that is able to convert a numeric value into English words.

Unlike the billing format samples implemented in the "Simple Invoice Templates" series, where the customized templates are usually created by moving fields and cells, or modifying Excel formulas etc., this "Advanced Invoicing Sample" series contains samples that require some knowledge of VBA programming and Microsoft Excel / Office object model.

This sample template demonstrates how you can call UIS action procedures (i.e. those actions performed when you clicking the buttons on the "Invoice" worksheet. By calling the UIS procedures from your own macro, you'll be able to include your own business logic on invoicing processing.

This sample template takes Advanced Invoicing Sample - Invoiced Total in English Words as the base template, which is a title featured on the "Business Invoice Templates" gallery. We'll add macro code to check if the email field in the "Bill To" section is blank - if so, saving invoice will be failed and a message is shown to ask the user to enter the email address. (Feel free to see samples in the email invoice template gallery).

  1. First open your invoice template as usual.
  2. Press ALT+F11 on keyboard to open the macro editor (Visual Basic for Applications editor).
  3. Add a reference to "UniformInvoiceSoftwareHelper": click the menu "Tools" / "Reference"; on the "References - VBA Project" dialog box check "UniformInvoiceSoftwareHelper" and then click "OK".
  4. Create a new module by clicking the menu "Insert", and then "Module".
  5. Copy & paste the following code into the editor.
    Option Explicit
    Public Sub NewSaveToDBProc()
        If Range("oknWhoEmail").Value = "" Then
            MsgBox "Please enter email address in the 'Bill To' section.", vbExclamation + vbOKOnly, "Save Invoice"
            Exit Sub
        End If
        UISClickProc ("oknCmdSave")
    End Sub
  6. Click menu "File" and then "Save".
  7. Click menu "File" and then "Close and Return to Microsoft Excel".
  8. Click the "Design Mode" button on the "Invoice" worksheet.
  9. Right-click the "Save To DB" button, choose "Assign Macro..." from the shortcut menu.
  10. On the "Assign Macro" dialog box, click and choose "NewSaveToDBProc" (which is the procedure name we created in the previous steps).
  11. Click "OK" to assign this new macro to the button and close the "Assign Macro" dialog box.
  12. Exit design mode by clicking the "Design Mode" button again on the "Invoice" worksheet.
  13. Save the template by clicking the "Save" button on Excel quick access toolbar.

Now when you click the "Save To DB" button to save an invoice, your own macro code will check if the email address field is empty. If so, it will refuses to save the invoice; otherwise, the invoice will be saved normally.

"UISClickProc" is a procedure provided by "UniformInvoiceSoftwareHelper" that is referenced to by using the "References - VBA Project" dialog box. In your macro code you call this procedure, and provide the button name as the argument to ask Uniform Invoice Software to perform the specified action.

You can provide any button name as the argument provided to "UISClickProc" procedure. To find the button name, first switch your template into design mode, and then click the button, the name box on the left-side of the formula shows the button name.

By calling "UISClickProc" from your own macro code, you can customize Uniform Invoice Software deeply in the way you like to meet your own business requirements.

Like other form designs here on, Advanced Format - Email Is Required Before Saving Invoice is free (offered to you at a price of 0.00USD). It works on Windows XP and all newer versions of Windows, and Excel 2007, 2010, 2013 or 2016.

Format and Specification

NameAdvanced Sample - Email Is Required Before Saving Invoice
CategorySales Invoice Template
Release DateTuesday, November 22, 2016
Format (XLS or XLSX).xlsm
Excel Version Excel 2003 / Excel 2007 / Excel 2010 / Excel 2013 / Excel 2016
Feature Gallery
Line Height (Points)18.00
Print Area$D$3:$K$46
Papaer Size / OrientationPortrait
Default Margins (Points)