A cross-platform Excel VBA invoice generator designed for practical business workflow automation.
Built for small businesses, freelancers, and operations teams that need a simple, maintainable way to create invoices using Microsoft Excel.
The workbook combines Excel Tables, structured formulas, reusable VBA modules, input validation, automatic invoice numbering, and platform-aware PDF workflows.
- Excel Table-based data model
- Customer master management
- Customer ID dropdown
- Automatic customer lookup
- Automatic customer information fill
- Automatic due date calculation
- Currency lookup
- Tax rate lookup
- Invoice item table
- Automatic subtotal calculation
- Automatic tax calculation
- Automatic total calculation
- Sequential invoice number generation
- Configurable invoice numbering
- New Invoice workflow
- Required-field validation
- Combined validation messages
- Print-ready invoice layout
- Cross-platform PDF workflow
- Automatic Windows/macOS detection
- Reusable VBA modules
- Business-oriented workflow automation
Customer Master
│
▼
Invoice Input
│
├── Customer Lookup
├── Currency Lookup
├── Tax Rate Lookup
├── Payment Terms
└── Due Date Calculation
│
▼
Input Validation
│
├── Customer
├── Invoice Date
└── Invoice Item
│
▼
Invoice Number Generation
│
▼
Invoice Output
│
▼
Platform Detection
│
├── Windows ──► Direct PDF Export
│
└── macOS ────► Native Print Dialog
│
▼
Save as PDF
Invoice Generator is designed to provide the most natural workflow available on each operating system rather than forcing identical technical behavior across platforms.
The user does not need to select an operating system.
Excel detects the current platform automatically and chooses the appropriate workflow.
On Windows:
- Click
Generate. - The invoice is validated.
- An invoice number is generated when required.
- A Save As dialog is displayed.
- Select the PDF file name and location.
- Excel exports the invoice directly as a PDF.
On macOS:
- Click
Generate. - The invoice is validated.
- An invoice number is generated when required.
- The native macOS print dialog opens.
- Select
PDF. - Choose
Save as PDF.
Cancelling the macOS print dialog is treated as a normal user action and does not produce an application error.
The New Invoice button prepares the workbook for the next invoice without removing formulas or workbook logic.
It clears only user-entered invoice data.
Customer ID
Invoice Date
Invoice Number
Description
Quantity
Unit Price
Customer lookup formulas
Due date formula
Currency lookup formula
Tax rate lookup formula
Amount formulas
Subtotal formula
Tax formula
Total formula
Table structure
Workbook configuration
This allows repeated invoice creation without rebuilding formulas or resetting the workbook manually.
Before an invoice number is generated or the PDF workflow begins, the workbook validates the required invoice information.
Current validation checks:
Customer
Invoice Date
At least one invoice item
When multiple fields are missing, all validation issues are displayed in a single message.
Example:
Please complete the following fields:
- Customer
- Invoice Date
- At least one invoice item
Validation occurs before invoice numbering so invalid invoices do not unnecessarily consume invoice numbers.
Invoice numbers are generated sequentially using workbook settings.
Example:
Invoice Prefix INV
Next Invoice Number 2
Invoice Number Digits 6
Generated invoice:
INV-000002
Numbering rules are maintained through worksheet settings rather than being hard-coded into the invoice generation workflow.
An existing invoice number is preserved when appropriate.
tblCustomers
│
├── Customer Name
├── Contact Name
├── Address
├── Email
├── Currency
├── Tax Rate
└── Payment Terms
│
▼
Invoice Input
│
├── Invoice Date
├── Due Date
├── Invoice Number
└── tblInvoiceItems
│
▼
Invoice Output
▲
│
tblSettings
│
├── Company Name
├── Company Address
├── Company Email
└── Invoice Configuration
Stores reusable customer information such as:
- Customer ID
- Customer Name
- Contact Name
- Address
- Currency
- Tax Rate
- Payment Terms
Primary invoice-entry screen.
The user selects a customer, enters the invoice date and invoice items, and starts invoice generation from this worksheet.
Print-ready invoice generated from Customer Master, Invoice Input, and Settings data.
Stores reusable company and invoice configuration values.
Examples include:
- Company Name
- Company Address
- Company Email
- Invoice Prefix
- Default Currency
- Default Tax Rate
- Payment Terms
- Invoice numbering configuration
VBA responsibilities are separated into focused modules.
Platform
│
├── Operating system detection
├── Cross-platform helpers
└── Save-path helpers
InvoiceGenerator
│
├── Invoice generation workflow
├── Windows PDF workflow
└── macOS print workflow
InvoiceNumberGenerator
│
├── Sequential numbering
├── Prefix handling
└── Number formatting
NewInvoice
│
├── Input reset
└── Formula preservation
InvoiceValidator
│
├── Required-field validation
└── Combined validation messages
This separation keeps platform logic, invoice generation, numbering, validation, and reset behavior independent and easier to maintain.
Invoice-Generator/
│
├── images/
│ ├── architecture.svg
│ ├── invoice-input.png
│ └── invoice-output.png
│
├── sample/
│ └── Invoice-Generator.xlsm
│
├── src/
│
├── Invoice-Generator.xlsm
├── LICENSE
└── README.md
- Microsoft Excel
- Excel VBA
- Excel Tables
- Structured References
- XLOOKUP
- Data Validation
- Print Layout
- PDF Workflows
- Windows/macOS Platform Detection
- Business Process Automation
Business data is structured around Excel Tables rather than fragile fixed ranges wherever practical.
Reset operations clear user input without destroying lookup or calculation formulas.
Platform detection, validation, numbering, invoice generation, and reset behavior are kept in separate VBA modules.
Business values and invoice-numbering rules are stored in workbook settings where possible.
Windows and macOS are not forced through an identical technical implementation.
Instead, the workbook automatically provides the workflow that fits each platform naturally.
The workbook handles technical decisions internally so users can focus on creating invoices.
- Freelancer invoicing
- Small business billing
- Client billing
- Service invoices
- Internal billing workflows
- Operations automation
- Excel workflow modernization
- Cross-platform Excel VBA demonstrations
Many small businesses and independent professionals still rely on manually maintained Excel invoices.
Manual invoice workflows can lead to repetitive data entry, inconsistent numbering, missing information, calculation mistakes, and duplicated work.
Invoice Generator demonstrates how a familiar Excel workflow can be transformed into a structured business tool through:
- reusable customer data
- automatic lookups
- calculated payment dates
- automatic tax calculations
- sequential invoice numbering
- input validation
- reusable invoice templates
- platform-aware PDF generation
The goal is not to replace a full accounting system.
Instead, the project demonstrates practical business-process automation using Excel and VBA while keeping the workbook understandable and maintainable.
v0.5 — Portfolio Ready
Core invoice-generation workflow is complete.
Verified workflow:
New Invoice
↓
Customer Selection
↓
Invoice Date
↓
Invoice Items
↓
Validation
↓
Automatic Invoice Number
↓
Invoice Output
↓
Windows / macOS PDF Workflow
macOS print workflow has been tested using the native Excel print dialog.
Windows direct PDF export is implemented and should be verified on a Windows Excel environment before production use.
Potential future enhancements:
- Invoice history
- Email sending
- Extended multi-currency support
- Dashboard
- Invoice status tracking
- Customer-specific invoice templates
- API integration
- Cloud integration
These features are outside the current portfolio-ready scope.
MIT License

