Skip to content
Imranosoft
LiteView2
Getting Started

LiteView2 Quickstart — Set Up in 5 Minutes

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).

Watch: Registered Mode setup (15-minute walkthrough)

A walkthrough that uses the boilerplate code below to configure an Access form with LiteView2 and render both local HTML content and a live web page.

Video covers Registered Mode. Reg-Free Mode setup is just below — same boilerplate, no admin command.

Before You Start

Registered Mode vs Reg-Free Mode

LiteView2 supports two deployment models because VBA developers work in very different environments. Some control their own PCs and can register OCX controls normally. Others work on locked-down corporate machines with no admin rights. Both modes expose the same browser engine — the difference is deployment style and how you write the VBA.
Registered Mode

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.

Reg-Free Mode

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().

Feature comparison
Registered Mode Reg-Free Mode
Setup requirement Run the installer once per machine. It needs administrator rights once, registers both bitnesses, and adds a normal Settings → Apps entry. No admin rights needed. Copy two OCX files from liteview2-regfree.zip 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 Run the installer once on each target machine (administrator rights once). 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.
Same core engine in both modes. Both modes use the same LiteView2 WebView2 engine internally. The difference is deployment style and VBA interaction pattern — not rendering capability. Every method, every event, every feature is available in both modes.
The key code difference
Registered Mode WithEvents + event subs
Private WithEvents m_lv As LiteView2Lib.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.example/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
Reg-Free Mode GetPool() + SetReadyCallback
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.example/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
Pros and cons

Registered Mode

  • Simpler code — event subs fire automatically, no polling loop
  • Drop the control visually at design time — you see exactly where it sits
  • IntelliSense works with a type library reference
  • Same pattern as any other ActiveX control you've used before

  • Requires running the installer once per machine (administrator rights once)
  • Deployment to other PCs needs IT involvement or admin access

Reg-Free Mode

  • Zero admin rights — works on locked-down corporate PCs
  • Self-contained: copy .accdb + OCX files to any PC and it runs
  • Multiple browsers per form with independent state
  • Browser profiles, InPrivate mode, cross-form browser pooling

  • Every call takes a browser index: GetPool().Method m_Idx, ...
  • No design-time events — ready notification via SetReadyCallback, not WithEvents
  • △ Requires one bootstrap module to be pasted once per database
Which one should you use?

Choose Registered Mode if…

  • You are developing on your own PC where you have admin rights
  • All machines that will run this database are machines you control
  • You want the simplest possible VBA code
  • You prefer placing controls visually at design time

Choose Reg-Free Mode if…

  • You are on a corporate PC with no admin rights
  • Your users are on machines you cannot install software on
  • You want to share the database by copying files — no setup required
  • You want browsers created and managed entirely in VBA code at runtime
Not sure which to start with? Projects can start in Registered Mode during development and switch to Reg-Free Mode for deployment if corporate environments require it. The VBA code changes are straightforward — the HTML and JavaScript stay exactly the same in both modes.
How deployment works
Registered Mode Developer PC
 ↓ run liteview2-setup.exe (once, admin required)
LiteView2_x64.ocx registered in Windows

Target PC
 ↓ run the installer again (once per PC)
Open .accdb normally
Reg-Free Mode Same folder, copy all three:
  YourDatabase.accdb
  LiteView2_x64.ocx
  LiteView2_x86.ocx

↓ paste to any PC
Open .accdb — works immediately

Choose your path

Select a setup guide

Choose the mode you decided on above and follow the step-by-step instructions.

No Admin Rights Needed

Reg-Free Mode

"I'm on a corporate machine, or I want to deploy without IT involvement."

  • Copy OCX files next to .accdb
  • Paste one bootstrap module once
  • Works on any PC — no installation
Setup time: ~5 minutes
Set Up Reg-Free Mode ↓

Still unsure? Start with Registered Mode. You can always switch later.


Registered Mode

Registered Mode — 4 Steps

Step 1 is a one-time install, done once per machine and never again. The whole flow takes about two minutes.

1

Download and run the installer

Download liteview2-setup.zip, unzip it, and run liteview2-setup.exe. Approve the Windows prompt when it asks for administrator rights.

The installer puts LiteView2 in C:\Program Files\LiteView2 and registers both the 64-bit and 32-bit controls, so the same machine works with 32-bit Office, 64-bit Office and VB6 without you choosing.

You do not need to run regsvr32. The installer does the registration for you, records what it changed, and gives you a real entry in Settings → Apps so you can remove it cleanly later. Registering by hand pins the OCX to whatever folder you ran the command in — move or delete that folder and every form breaks with “There is no object in this control.” The installer avoids that by owning a permanent location.
Updating an earlier LiteView2? Run the latest installer the same way. It updates the version you have in one step and keeps your license key and settings. See Updating LiteView2.
Windows will warn you before it runs. LiteView2 is not code-signed, so SmartScreen shows “Windows protected your PC”. Click More info → Run anyway. If you would rather install nothing at all, use Reg-Free Mode instead — it needs no installer and no admin rights.
2

Add LiteView2 to your Toolbox

Open the VBA editor (Alt+F11), right-click the Toolbox → Additional Controls → tick "LiteView2 Control". Click OK. The LiteView2 icon appears in your Toolbox.

3

Drop it on a form

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.

4

Add the VBA event subs

In the form's module, paste this code:

Private WithEvents m_lv As LiteView2Lib.LiteView2Ctrl

Private Sub Form_Load()
    Set m_lv = Me.LiteView2Ctrl1.Object
End Sub

Private Sub m_lv_WebViewReady()
    m_lv.Navigate "https://lv2.example/hello_browser.html"
End Sub
What is 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.
Press F5. The browser loads inside your form. You have a working browser in Registered Mode.

Reg-Free Mode

Reg-Free Mode — 5 Steps

No registration, no admin rights, no IT ticket. The OCX files travel with your database.

1

Copy the OCX files next to your database

Download liteview2-regfree.zip and copy both OCX files into the same folder as your .accdb file:

LiteView2_x64.ocx
LiteView2_x86.ocx
Keep both. LiteView2 picks the correct one automatically based on your Office bitness. The same zip also contains modLV2Pool.bas, the bootstrap module used in step 3 — import it instead of retyping it. Do not rename the OCX files: the bootstrap declares them by these exact names.
2

Add a Frame control to your form

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.

3

Paste the bootstrap module — once per database

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
What does this module do? It tells Windows where your OCX file is (next to your .accdb), loads it without registering it in the Windows registry, and makes the browser engine available to all your forms via GetPool(). After pasting it once, you never open or modify it again.
4

Add the form code

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.example/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
Why 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.
5

Run the form

Open the form. The browser loads inside your Frame. You have a working browser in Reg-Free Mode.
Deploying to another PC? Copy the .accdb plus both OCX files. No installation, no admin rights, no IT ticket — it runs immediately.

What just happened

You Now Have a Full Browser in a VBA Form

The browser engine (called WebView2) is built into Windows 10 and 11 — you didn't install anything extra. LiteView2 gives you a complete VBA surface on top of it: hundreds of documented methods, dozens of documented events, DOM helpers, JSON parsing, and two-way communication between VBA and the web page.

The https://lv2.example/ URL is a label for your local HTML files — not a real website. Use SetLocalContentRoot to point it at your HTML folder, then Navigate to load any file by name.

Common Next Step

Loading Your Own HTML Files

To navigate to a local HTML file stored in your database folder, call SetLocalContentRoot first:

' In m_lv_WebViewReady (Registered Mode):
m_lv.SetLocalContentRoot CurrentProject.Path & "\demos"
m_lv.Navigate "https://lv2.example/my_dashboard.html"

' The URL https://lv2.example/ maps to the folder you set above.
' It is not a real website — just a label for local files.

In Reg-Free Mode, add the browser index as the first argument to every call:

GetPool().SetLocalContentRoot m_Idx, CurrentProject.Path & "\demos"
GetPool().Navigate m_Idx, "https://lv2.example/my_dashboard.html"

Your Trial: 30 Days, Full Functionality

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"

Reference

If You See a Confusing Term…

Quick translation table for terms that appear in the docs.

TermPlain English
Registered ModeUsing LiteView2 after running the installer once on the machine. Drag-and-drop the control onto a form, native VBA events.
Reg-Free ModeUsing LiteView2 without any registry commands. Copy OCX files next to .accdb, use GetPool().
WebView2The browser engine built into Windows 10/11. Already on your PC — nothing to install.
OCXThe LiteView2 control file. Like a DLL but for ActiveX controls.
WithEventsStandard VBA keyword to receive events from a control. Same pattern as Form_Load or Worksheet_Change.
WebViewReadyThe VBA Sub that fires when the browser is ready to load a page. Your browser's equivalent of Form_Load.
NavigationCompletedFires after a page finishes loading. Safe to send data to the page here.
WebMessageReceivedThe 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_IdxWhich browser slot to use in Reg-Free Mode. If you have one browser, this is always 1.
ExecuteScriptRun JavaScript in the page from VBA.
SetLocalContentRootTell LiteView2 which folder your HTML files are stored in.
https://lv2.example/A label for your local HTML files — not a real website.
PostWebMessageAsJsonSend data from VBA to the web page as JSON.
PushRecordsetSend your query results to the web page in one call.
SetReadyCallbackReg-Free Mode: register a VBA method to be called when a browser is ready. Replaces polling IsReady() in a timer.
ClearReadyCallbackRemove the ready callback before destroying a browser in Form_Unload. Prevents a deferred callback from firing after the form closes.
IBrowserPoolThe interface used in Reg-Free Mode to manage the browser pool.
DOMThe page's controls — text boxes, buttons, checkboxes.