Before → after
Runtime Error 3048 + compile failures → compile-clean, shipped on schedule
Before
- Runtime Error 3048 (Too many open databases) and mystery compile errors appearing after an Office 64-bit push across the company.
- Original developer gone. One 2,400-line Form module. Legacy Declare statements without PtrSafe. On Error Resume Next throughout. No error log for ODBC failures.
- Two prior contractors tried and billed hours without resolving. IT was considering delaying the Office rollout company-wide.
After
- Modules mapped and dead code paths identified. All Windows API Declares audited and PtrSafe + LongPtr applied with conditional compile blocks for dual-bitness.
- DAO recordsets used on bulk import paths (replacing slow ADO calls). SQL strings sanitized on pass-through queries to SQL Server.
- On Error GoTo handlers added to all IO procedures. Error logging to a dedicated table. COM automation (Excel export) wrapped in a class module with proper .Quit and Set Nothing in exit block.
- UAT checklist signed. Compile-clean on 64-bit Office 365. IT rolled out the update on schedule.
Results
- Compile-clean on 64-bit
- Office rollout unblocked
- IT signed release
Direct VBA work — documented, owned by you, one developer start to finish
Prior contractors: weeks and unresolved. Direct freelance: scoped and shipped in days.


