VBA & Macro Problems

How to Open and Edit Long Excel Notes with a Double-Click in WPS Office

Olivia MillerOlivia Miller Nov 13, 2026 869 views

Question details

The user wants to create an expanded note editor in a spreadsheet that opens when double-clicking a notes cell and saves the edited text back to the correct row using VBA.

Product
WPS Office Spreadsheets
Device & OS
not provided
Scenario
A user maintains a spreadsheet with long text notes in a notes column and wants a double-click to open an expanded editor instead of editing in the cell or formula bar.
Observed behavior
The default cell editing is too limited for long notes; the goal is a scrollable VBA UserForm that loads the selected row note and writes changes back to the same row.
Before you start

Save the workbook as a macro-enabled file (.xlsm) and make sure macros are enabled. Open the VBA editor from the Developer tab or by pressing Alt+F11 before creating the UserForm.

Solution 1Recommended

Create a VBA UserForm note editor and trigger it with Worksheet_BeforeDoubleClick

Use this method when you need a dedicated, scrollable editor for long notes and want the edited text saved back to the same row.

Use a module-level row variable so the UserForm can load the current note and write the edited text back to the same row. The Worksheet_BeforeDoubleClick event must cancel the default in-cell edit when the clicked cell belongs to the notes column.

1
Open the VBA editor

Press Alt+F11 or go to the Developer tab and click Visual Basic to open the VBA editor.

2
Insert a UserForm with a text box and Save button

In the VBA editor, click Insert > UserForm. Add a TextBox control, set MultiLine to True and ScrollBars to vertical, then add a Save button to the form.

3
Load and save the note from the correct row

In the UserForm code, use a module-level variable to hold the double-clicked row. When the form opens, load the notes column value into the TextBox, and on the Save button click write the TextBox value back to that same row.

4
Add the Worksheet_BeforeDoubleClick event

In the worksheet module, add the Worksheet_BeforeDoubleClick event. Check whether the clicked cell is in the notes column; if it is, store the row number, load the existing note, show the UserForm, and set Cancel = True.

5
Save the workbook as macro-enabled

Save the workbook as an Excel Macro-Enabled Workbook (.xlsm) so the VBA project and UserForm are retained.

Macros must be enabled: If the editor does not open on double-click, check the Trust Center macro settings and confirm the workbook is saved in .xlsm format.
WPS Spreadsheets VBA Solution

Create a Double-Click Long Note Editor in WPS Spreadsheets with VBA

WPS Spreadsheets supports VBA UserForms, so you can build a macro-enabled workbook that opens a scrollable note editor on double-click and saves each edit to the correct row.

  1. 1. Open WPS Spreadsheets and enable the Developer tab: Click the File menu, choose Options, enable the Developer tab, or press Alt+F11 to open the VBA editor.
  2. 2. Insert the UserForm note editor: In the VBA editor, select Insert > UserForm, add a multiline scrollable TextBox and a Save button to the form.
  3. 3. Add the double-click event code: In the worksheet module, add Worksheet_BeforeDoubleClick to detect the notes column, load the active row note, and show the UserForm.
  4. 4. Save the macro-enabled workbook: Save as Excel Macro-Enabled Workbook (.xlsm) so the note editor remains available the next time the file is opened.
Edit long notes in a dedicated scrollable UserForm instead of a cramped cell.Automatically saves edited text to the correct worksheet row.Maintains Microsoft Excel .xlsm macro-enabled workbook compatibility.Uses the familiar VBA editor workflow for easy Excel macro migration.Lightweight and free with WPS Office.
microsoft office alternative - wps office

Frequently Asked Questions

Why does nothing happen when I double-click the notes cell?

Make sure the workbook is saved as an .xlsm file and macros are enabled in Trust Center. Also check that the Worksheet_BeforeDoubleClick code is placed in the worksheet module, not a standard module.

Can I use this VBA note editor in WPS Office if the file was created in Excel 365?

Yes. WPS Spreadsheets can open Excel macro-enabled workbooks and supports VBA UserForms. Open the file in WPS Spreadsheets, enable macros, and verify the Developer tab is available.

How do I make the UserForm text box scroll for long notes?

In the UserForm designer, set the TextBox MultiLine property to True and set ScrollBars to vertical. You can also increase the form and TextBox height for better readability.

How does the Save button know which row to update?

Store the double-clicked row number in a module-level variable inside the Worksheet_BeforeDoubleClick event before showing the UserForm. The Save button code then writes the TextBox value back to that stored row.

Do I have to save the workbook as XLSM?

Yes. VBA macros and UserForms are not retained in a normal .xlsx file, so use Save As > Excel Macro-Enabled Workbook (*.xlsm).