Embed HTML5 Components Inside Excel VBA UserForms
Excel UserForms can display native controls — labels, text boxes, list boxes. LiteView2 adds a Chromium browser inside the UserForm, so you can embed TinyMCE, Chart.js, AG Grid, PDF.js, or any other web component alongside your existing VBA code.
Who this is for: Excel VBA developers adding dashboards, grids, editors, or rich UI to existing workbooks.
Excel VBA
Embed Chromium in Excel VBA — in 5 Minutes
Also works in Access, Word, Outlook, PowerPoint, VB6, VB.NET, C#, Delphi, Python — and any COM host.
LiteView2 embeds a full Chromium WebView2 browser inside an Excel UserForm. It renders modern HTML5, runs JavaScript, and bridges directly to VBA — no automation framework, no CDP, no external process. Drop the control on a UserForm and you have a Chromium browser in your spreadsheet in under 5 minutes.
30-day commercial trial · No telemetry · 32-bit and 64-bit · No admin required (reg-free mode)
Setup in 4 steps
1
Register the OCX or copy it next to your workbook
Registered Mode: Run LiteView2 Setup (liteview2-setup.zip) once (admin required); it installs and registers both the 32-bit and the 64-bit control. Reg-Free Mode: Copy both OCX files next to your .xlsm — no admin rights needed.
2
Add the control to a UserForm
Registered Mode: Open a UserForm. Right-click Toolbox → Additional Controls → tick LiteView2 Control → drag onto form. Reg-Free Mode: Add a plain Frame control to the UserForm instead.
3
Add the VBA code
' Registered Mode — in your UserForm module
Private WithEvents m_lv As LiteView2Lib.LiteView2Ctrl
Private Sub UserForm_Initialize()
Set m_lv = Me.LiteView2Ctrl1.Object
End Sub
Private Sub m_lv_WebViewReady()
m_lv.SetLocalContentRoot ThisWorkbook.Path & "\html"
m_lv.Navigate "https://lv2.example/dashboard.html"
End Sub
Private Sub m_lv_NavigationCompleted(ByVal url As String, ByVal success As Boolean)
' Push Excel data to the browser
Dim json As String
json = "{""total"": " & Range("B1").Value & "}"
m_lv.ExecuteScript "updateDashboard(" & json & ")"
End Sub
Private Sub m_lv_WebMessageReceived(ByVal message As String, ByVal source As String)
' Receive data back from JavaScript
If InStr(message, "export") > 0 Then ExportData
End Sub
4
Run the UserForm
Press F5 or call UserForm1.Show from a macro. The browser loads inside the UserForm and renders your HTML5 page.
Why not just use a browser automation framework or the legacy WebBrowser control?
The legacy WebBrowser control in Excel
Since Excel 2013, the legacy Web Browser control can't be inserted directly on a worksheet ("Cannot insert object"); Microsoft suggests using it on a VBA UserForm instead. It renders with the Internet Explorer 11 engine, so many modern pages and scripts do not work in it. LiteView2 uses the current Chromium engine — the same one in Google Chrome.
Browser automation frameworks are for automation, not embedding
Browser automation frameworks run a browser as a separate process that you control over a network protocol. They are excellent for automating external websites. LiteView2 puts the browser inside your UserForm — same window, same process, same VBA event loop. JavaScript in the page can call VBA methods directly via AddHostObjectToScript.
FAQ
Can I embed a browser in an Excel UserForm?
Yes. LiteView2 is an ActiveX OCX designed specifically for this. Drop it on a UserForm (Registered Mode) or embed at runtime via IBrowserPool into a Frame control (Reg-Free Mode).
Does it work in 32-bit and 64-bit Excel?
Yes. LiteView2 ships both LiteView2_x86.ocx (32-bit) and LiteView2_x64.ocx (64-bit). The correct file is loaded automatically based on your Office bitness.
Can I push Excel data (ranges, tables) to the browser?
Yes. Use ExecuteScript to call a JavaScript function with JSON data, or push a DAO/ADO recordset directly using PushRecordset. JavaScript in the page receives the data and renders it — no page reload needed.
Chromium inside Excel — 5 minutes from now
HTML5, JavaScript, Chart.js, Bootstrap — inside your UserForm. Free 30-day trial.
Download free 30-day trial
30-day commercial trial · No telemetry · 32-bit and 64-bit
WebView2 in Access VBA ·
HTML5 Dashboards in VBA ·
Replace the WebBrowser Control ·
Full API reference