Forum Discussion
Expanding notes column
Yes, it is possible to create a solution for expanding the notes column in Excel 365. One approach is to use a VBA macro to create a userform that displays the notes for the selected row in a larger textbox. Here is a brief description of how it could work:
Open the VBA Editor by pressing ALT+F11.
Create a new userform by clicking Insert > UserForm.
Add a textbox to the userform and set its properties to be multiline and scrollable.
Add a command button to the userform and label it "Save".
Add the following code to the userform module:
Private Sub UserForm_Initialize()
' Get the active row and notes column
Dim row As Integer
row = ActiveCell.Row
Dim notesCol As Integer
notesCol = 5 ' Change this to the column number for your notes column
' Set the textbox value to the notes for the active row
Me.TextBox1.Value = Cells(row, notesCol).Value
End Sub
Private Sub SaveButton_Click()
' Get the active row and notes column
Dim row As Integer
row = ActiveCell.Row
Dim notesCol As Integer
notesCol = 5 ' Change this to the column number for your notes column
' Save the textbox value to the notes for the active row
Cells(row, notesCol).Value = Me.TextBox1.Value
' Close the userform
Unload Me
End Sub
Add the following code to a new module:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
' Check if the double-clicked cell is in the notes column
Dim notesCol As Integer
notesCol = 5 ' Change this to the column number for your notes column
If Target.Column = notesCol Then
' Show the notes userform
NotesForm.Show
Cancel = True
End If
End Sub
This code sets up a listener for the BeforeDoubleClick event in the worksheet, and checks if the double-clicked cell is in the notes column. If it is, the code shows the notes userform and cancels the double-click event. The userform then displays the notes for the selected row in a larger textbox, and the user can edit them as needed. When the user clicks the "Save" button on the userform, the edited notes are saved back to the worksheet and the userform is closed.
Note that you will need to adjust the column number for your notes column in the code, as well as any other userform properties or functionality as desired.
Proposed solution with the support of AI. Haven't tried it myself, feedback would be nice :).
Il give your code a try and report back.
Thanks