Converting a VBA UserForm to Google Sheets
Published 25 October 2026. Checked against Google's documentation on 11 October 2026.
A UserForm is a Windows dialog designed in the VBA editor: text boxes, drop-downs, buttons, and the VBA behind each control. Google Sheets has nothing like it, and Google's Macro Converter documentation says so directly: "The Macro Converter doesn't convert UserForms. Manually create them in Apps Script." In MacroBridge's scan of 1,340 macro workbooks from public GitHub repositories, 34.0% had at least one, so if yours does, you are in common company.
What replaces it
Apps Script shows custom interfaces as HTML, through the HTML service, in a dialog or a sidebar next to the sheet (dialogs and sidebars). For a single question, the built-in prompt() and alert() of the Ui class may be all you need.
How the rebuild goes
- Rebuild the layout as an HTML form. Each text box, combo box and button becomes an HTML input, select or button in an HTML file in the Apps Script project.
- Split the code in two. The VBA behind the form ran in one place. In Apps Script, code in the HTML page runs in the user's browser, and code that reads or writes the spreadsheet runs on Google's servers. The page calls the server with
google.script.run. - Turn events into handlers.
CommandButton1_Clickbecomes a click handler in the page;UserForm_Initialize, which filled the drop-downs, becomes a server function the page calls when it opens. - Open it from a menu. Where Excel showed the form from a button or
UserForm1.Show, Apps Script opens the dialog from a custom menu item, as in Google's own example.
The differences to expect
- The dialog does not pause the script. Google: "Custom dialogs do not suspend the server-side script while the dialog is open", and sidebars do not either. VBA code that showed a modal form and carried on with its values afterwards has to be restructured so the form's submit button calls the next step.
- It looks like a web page, because it is one. Layout is HTML and CSS, not the VBA form designer.
- ActiveX controls on the sheet itself (a button or checkbox drawn on a worksheet) do not survive the move either; a menu, or a drawing or image with a script assigned to it (custom menus), replaces them.
How much work is it?
It depends on the form: a five-field data-entry form is a small, predictable job; a form with cascading lists and validation tied to several sheets is not. The free report lists every UserForm in the workbook and every procedure behind it, which is what a fixed price for the rebuild is calculated from.
Sources
Google's documentation, read on 11 October 2026. Google updates these pages; if one now says something different, it wins.
- Address common issues (Macro Converter)
- Dialogs and sidebars in Google Workspace documents
- HTML service
- Ui class reference (alert, prompt)
- Custom menus