The problem
A Visual Basic 6 application usually survives because it holds real business rules. The forms look old, but the code behind them knows how orders are priced, how stock is reserved, and which customer gets credit. That knowledge is the asset. The language is not the main problem. The problem is that the knowledge sits in .frm files, .bas modules, .cls class modules and stored procedures that few people can read. This playbook, How to modernize Visual Basic 6 application, starts from that fact.
A big bang rewrite throws that knowledge away and asks users to describe it from memory. You will miss rules. The old app also depends on COM DLLs, ActiveX controls, the VB6 runtime, ODBC or ADO connection strings, Crystal Reports files, mapped drives and scheduled tasks. Each dependency can break a rewrite in a way that is hard to see until cutover. The safer path is to keep the old system running while you move one workflow at a time.
The first job is not coding. It is an inventory you can trust. List every .vbp project, every reference under Project, References, every toolbox component, every database object the app touches, and every batch job from Windows Task Scheduler or SQL Server Agent. Add the people who know the work. That list is your map and your risk register.
What a good solution looks like
A good solution looks like a controlled sequence of small releases. The old VB6 app stays in production. You put a boundary in front of the parts you want to change. That boundary can be an ActiveX DLL built in VB6, a .NET assembly exposed to COM, or a small HTTP service. New code calls the boundary. Old forms can call the same boundary. This lets you replace a screen or a batch job without rewriting the whole system.
Migrate by use case, not by layer. Pick one workflow with clear inputs and outputs, such as 'approve a purchase order' or 'post a daily invoice run.' Keep the database schema stable at first. Use views or stored procedures as the contract. If you change the schema and the UI in the same release, you cannot tell which change caused a defect. Stable data plus a narrow change gives you a clean rollback.
Preserve COM identity while you move. In VB6 Project Properties, Component tab, set Version Compatibility to Binary Compatibility and point it at a reference DLL. That keeps GUIDs, interfaces and registration stable for callers. Keep a build machine with the same VB6 service pack and the same third party controls. A good plan also names the retirement target for each component: keep, wrap, replace or retire. A component with no owner and no users is a candidate for retirement, not migration.
How to build it
Start with a read only pass. Open each .vbp in the VB6 IDE and record the references, components and compile settings. Use Process Monitor to see which files and registry keys the app reads at startup. Use Dependency Walker on the EXE and DLLs to find missing dependencies. On the database side, capture queries with SQL Server Extended Events or the database query log. Do not change code during this pass.
Next, freeze a known good build. Compile to a clean folder. Register DLLs and OCX files with regsvr32 on a test machine that matches the users' machines. Check DCOM settings in Component Services if the app uses remote COM. Write characterization tests around the workflow you picked. A script that posts the same input file and compares the output table, PDF or ledger entry is enough. Capture the current output as the expected result before you touch anything.
Then build the boundary. If you stay in VB6, add a class module with public methods that wrap the workflow. If you move to .NET, create a COM visible assembly and call it from VB6 through CreateObject or a reference. Keep the method names close to the business step, not to the screen. Deploy the boundary with the old app and route one pilot group through it. The old path stays available. Log every call with a correlation ID so you can compare old and new results.
Move the workflow in small slices. First move a read only view, then a write path, then the batch job. Keep the old screen as a fallback until the new path has run through a full business cycle, including month end if that matters. For reports, rebuild the query before the layout. A report that looks different will trigger support calls even when the numbers are correct. Put both versions side by side for one cycle and reconcile the totals.
Risks and how to manage them
The biggest risk is a broken COM registration. A new DLL version can overwrite a shared OCX and break an unrelated app. Keep a versioned folder per release and avoid registering into the system folder when you can. Test on a clean Windows image, not on the developer machine. Check the Windows Event Log and the app's own error log after each install. If the app uses remote COM, export the DCOMCNFG settings before you change anything.
The second risk is hidden logic. Triggers, views, scheduled jobs and report formulas often hold rules that the VB6 code assumes. A rewrite that only reads the forms will miss them. Shadow a user for a full cycle and compare database rows before and after. Keep a rollback point at every step: the old EXE, old DLLs, old connection string and old job schedule. A rollback that takes an hour is fine. A rollback that takes a weekend is not.
Watch for licensing and platform limits. Some ActiveX controls need a design-time license or a specific runtime. Some only work in 32-bit processes. If you move to a 64-bit host, you may need a separate 32-bit helper process or a replacement control. Plan that work before you promise a date. Also watch user habits: keyboard shortcuts and printed layouts. A new screen that is correct but slower to use will be rejected.
How to measure success
Measure the migration by workflow, not by lines of code. Track how many workflows run on the new path, how many still depend on the old EXE, and how long a rollback takes. Count defects found in reconciliation. Tickets are a lagging sign. Also track the number of components with no named owner. That number should fall as you retire dead code.
Track operational signals after each release: start-up time for the app, failed login attempts, batch job duration, and the count of manual corrections in the ledger or stock table. These are not vanity metrics. They tell you whether the new path behaves like the old one under real load. Keep a simple log of what changed, who approved it, and which rollback point was current. That log helps when an auditor or a new engineer asks why a component exists.
A fixed scope assessment can save time before you commit. The Cloudverg Legacy modernization sprint at $8,500/month gives you an inventory, recovered business rules, a ranked risk list, options to rehost, refactor, replace or retire, a migration sequence with rollback points, and a fixed quote for the first phase. It is one option. You can also run the inventory with your own team, hire a VB6 contractor for a short engagement, or start with one workflow. The right choice depends on how much is unknown and how soon support runs out.
Frequently asked questions
Can we rewrite the whole VB6 app in one release?
You can, but it is the highest risk path. The old code holds rules that are not written down, and a full rewrite removes your fallback. Move one workflow first and keep the old app available until the new path matches.
How do we handle ActiveX controls and COM DLLs?
Inventory every OCX and DLL, including version, license and registration path. Test on a clean machine with the same Windows version as users. If you move to 64-bit, plan a 32-bit helper or a replacement control before you commit to a date.
What if the original VB6 developer has left?
Start with the code and the users. Use the inventory, Process Monitor and database query logs to rebuild the map. Shadow the people who do the work and capture their inputs and outputs as tests. You do not need a former developer to start, but you do need someone who can approve behavior.