Works in VBA (Excel, Access, Word, Outlook, PowerPoint, Visio, Project), VB6, VB.NET, C#, C++, Delphi, Python, PowerShell, AutoIt — and any COM host.
LiteView2 embeds a full Chromium browser inside your Access or Excel form — the same way you'd add a text box or PDF viewer. Choose Registered Mode (2 minutes, admin once) or Reg-Free Mode (5 minutes, zero admin).
Run one administrator command once, then drag the LiteView2 control onto your form like a text box. VBA events fire automatically — no polling, no extra code.
No administrator command needed. Copy the OCX files next to your .accdb and paste one bootstrap module. Browsers are created in VBA code via GetPool().CreateInControl().
| Registered Mode | Reg-Free Mode | |
|---|---|---|
| Setup requirement | Requires a one-time administrator command (regsvr32) — done once per machine, never again. |
No admin rights needed. Copy two OCX files into the same folder as your .accdb. |
| Form control | Drag LiteView2Ctrl from the Toolbox onto the form at design time — just like a text box. | Add a plain Frame control to the form. The browser attaches to it at runtime via VBA code. |
| VBA bootstrap | None. Set m_lv = Me.LiteView2Ctrl1.Object in Form_Load is all you need. |
Paste the modLV2Pool module once per database. Call GetPool() from any form. Never touch it again. |
| ⚡ Core difference |
control + events Direct method calls on m_lv. Events fire automatically via COM — m_lv_WebViewReady() runs the moment the browser is ready.
|
pool + browser index Every call goes through the pool with a browser index — GetPool().Navigate m_Idx, url. Browser readiness is signalled via SetReadyCallback — no timer needed.
|
| Readiness signal | m_lv_WebViewReady() fires automatically — same pattern as Form_Load. |
Call pool.SetReadyCallback idx, Me, "OnBrowserReady" — LiteView2 calls your VBA method on the UI thread the moment the browser is ready. |
| Deploy to other PCs | Requires a one-time administrator command on each target machine. | Copy .accdb + both OCX files. Zero installation, zero admin rights on any machine. |
| Multiple browsers | Add multiple OCX controls at design time (e.g. LiteView2Ctrl1, LiteView2Ctrl2), each with its own WithEvents variable. |
Multiple browsers created in code at runtime, each addressed by a numeric index. No design-time controls needed. |
Private WithEvents m_lv As LiteView2.LiteView2Ctrl
Private Sub Form_Load()
Set m_lv = Me.LiteView2Ctrl1.Object
End Sub
' Fires automatically when browser is ready
Private Sub m_lv_WebViewReady()
m_lv.Navigate "https://lv2.local/app.html"
End Sub
' Fires when page finishes loading
Private Sub m_lv_NavigationCompleted( _
ByVal url As String, ByVal success As Boolean)
' safe to push data here
End Sub
Private pool As Object
Private idx As Long
Private Sub Form_Load()
Set pool = GetPool()
idx = pool.CreateInControl( _
"about:blank", Me.Frame1)
pool.SetReadyCallback idx, Me, "OnBrowserReady"
End Sub
' Called by LiteView2 on the UI thread when ready
Public Sub OnBrowserReady()
pool.SetLocalContentRoot idx, CurrentProject.Path
pool.Navigate idx, "https://lv2.local/app.html"
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
If Not pool Is Nothing And idx <> 0 Then
pool.ClearReadyCallback idx
pool.DestroyBrowserSync idx, 2000
idx = 0
End If
End Sub
GetPool().Method m_Idx, ...SetReadyCallback, not WithEventsChoose the mode you decided on above and follow the step-by-step instructions.
"I have admin rights on this machine, or I'm developing on my own PC."
"I'm on a corporate machine, or I want to deploy without IT involvement."
Still unsure? Start with Registered Mode. You can always switch later.
Step 2 is a one-time administrator command — done once per machine, never again. The whole flow takes about two minutes.
Before registering, copy both OCX files into a stable folder you won't clean out later.
We recommend C:\LiteView2\ — no spaces in the path, no UAC virtualization quirks, easy to remember.
C:\LiteView2\LiteView2_x64.ocx
C:\LiteView2\LiteView2_x86.ocx
regsvr32 records the OCX file's exact path
in the Windows registry. If you later move or delete the OCX from this folder — for example,
by registering it straight out of your Downloads folder and then cleaning Downloads — every form
using LiteView2 will fail to load with "There is no object in this control." Pick a folder you'll keep.
Open Command Prompt as Administrator. Run this command once:
regsvr32 "C:\LiteView2\LiteView2_x64.ocx"
LiteView2_x86.ocx instead.
Not sure which? In Access: Help → About Microsoft Access. If it says "(32-bit)", use x86.
Open the VBA editor (Alt+F11), right-click the Toolbox → Additional Controls → tick "LiteView2 Control". Click OK. The LiteView2 icon appears in your Toolbox.
Open a form in Design View. Drag the LiteView2 control onto it —
exactly like adding a text box or list box. Resize it to fill the
area where you want the browser to appear.
The control will be named LiteView2Ctrl1 by default.
In the form's module, paste this code:
Private WithEvents m_lv As LiteView2.LiteView2Ctrl
Private Sub Form_Load()
Set m_lv = Me.LiteView2Ctrl1.Object
End Sub
Private Sub m_lv_WebViewReady()
m_lv.Navigate "https://lv2.local/hello_browser.html"
End Sub
WithEvents? It means "let me know when something
happens in the browser." WebViewReady is the Sub that runs when the
browser is ready to load a page — the same pattern as Form_Load for a form.
You only add the event subs you actually need.
No registration, no admin rights, no IT ticket. The OCX files travel with your database.
Copy both files from the trial zip into the same folder as your .accdb file:
LiteView2_x64.ocx
LiteView2_x86.ocx
In Design View, add a standard Frame (rectangle) control to your form.
This is where the browser will appear. Set its Special Effect to Flat
and remove its label. Name it Frame1.
In the VBA editor (Alt+F11), insert a new Standard Module. Name it modLV2Pool.
Paste this code. You do this once per database, then forget it exists.
Option Explicit
#If Win64 Then
Private Declare PtrSafe Function SetDllDirectory Lib "kernel32" _
Alias "SetDllDirectoryW" (ByVal lpPathName As LongPtr) As Long
Private Declare PtrSafe Function LiteView2_ActivateManifest _
Lib "LiteView2_x64.ocx" (ByVal path As LongPtr) As Long
Private Declare PtrSafe Function LiteView2_CreateBrowserPool _
Lib "LiteView2_x64.ocx" () As Object
#Else
Private Declare Function SetDllDirectory Lib "kernel32" _
Alias "SetDllDirectoryW" (ByVal lpPathName As Long) As Long
Private Declare Function LiteView2_ActivateManifest _
Lib "LiteView2_x86.ocx" (ByVal path As Long) As Long
Private Declare Function LiteView2_CreateBrowserPool _
Lib "LiteView2_x86.ocx" () As Object
#End If
Private m_Pool As Object
Public Function GetPool() As Object
If m_Pool Is Nothing Then
Dim p As String
p = CurrentProject.Path
SetDllDirectory StrPtr(p)
#If Win64 Then
LiteView2_ActivateManifest StrPtr(p & "\LiteView2_x64.ocx")
#Else
LiteView2_ActivateManifest StrPtr(p & "\LiteView2_x86.ocx")
#End If
Set m_Pool = LiteView2_CreateBrowserPool()
End If
Set GetPool = m_Pool
End Function
GetPool().
After pasting it once, you never open or modify it again.
In the form's module:
Private pool As Object
Private idx As Long
Private Sub Form_Load()
Set pool = GetPool()
idx = pool.CreateInControl("about:blank", Me.Frame1)
pool.SetReadyCallback idx, Me, "OnBrowserReady"
End Sub
' LiteView2 calls this on the UI thread when the browser is ready
Public Sub OnBrowserReady()
pool.SetLocalContentRoot idx, CurrentProject.Path & "\demos"
pool.Navigate idx, "https://lv2.local/hello_browser.html"
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
If Not pool Is Nothing And idx <> 0 Then
pool.ClearReadyCallback idx
pool.DestroyBrowserSync idx, 2000
idx = 0
End If
End Sub
ClearReadyCallback in Form_Unload?
Always clear the callback before destroying the browser — it prevents a deferred callback from firing against a form that has already closed.
Nothing is locked. Every method, every event, every feature is available during the trial — in both Registered Mode and Reg-Free Mode.
Check days remaining at any time: Debug.Print m_lv.TrialDaysRemaining
When the trial ends the control stops initializing — no data loss, no database corruption.
To activate, add one line: m_lv.ActivateLicense "Your Name", "YOUR-KEY"
Quick translation table for terms that appear in the docs.
| Term | Plain English |
|---|---|
| Registered Mode | Using LiteView2 after running regsvr32 once. Drag-and-drop OCX onto form, native VBA events. |
| Reg-Free Mode | Using LiteView2 without any registry commands. Copy OCX files next to .accdb, use GetPool(). |
| WebView2 | The browser engine built into Windows 10/11. Already on your PC — nothing to install. |
| OCX | The LiteView2 control file. Like a DLL but for ActiveX controls. |
| WithEvents | Standard VBA keyword to receive events from a control. Same pattern as Form_Load or Worksheet_Change. |
| WebViewReady | The VBA Sub that fires when the browser is ready to load a page. Your browser's equivalent of Form_Load. |
| NavigationCompleted | Fires after a page finishes loading. Safe to send data to the page here. |
| WebMessageReceived | The Sub that fires when the web page sends data back to your VBA code. |
| GetPool() | The function from the bootstrap module that returns the browser engine in Reg-Free Mode. |
| browserIndex / m_Idx | Which browser slot to use in Reg-Free Mode. If you have one browser, this is always 1. |
| ExecuteScript | Run JavaScript in the page from VBA. |
| SetLocalContentRoot | Tell LiteView2 which folder your HTML files are stored in. |
| https://lv2.local/ | A label for your local HTML files — not a real website. |
| PostWebMessageAsJson | Send data from VBA to the web page as JSON. |
| PushRecordset | Send your query results to the web page in one call. |
| SetReadyCallback | Reg-Free Mode: register a VBA method to be called when a browser is ready. Replaces polling IsReady() in a timer. |
| ClearReadyCallback | Remove the ready callback before destroying a browser in Form_Unload. Prevents a deferred callback from firing after the form closes. |
| IBrowserPool | The interface used in Reg-Free Mode to manage the browser pool. |
| DOM | The page's controls — text boxes, buttons, checkboxes. |