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 :).
- NikolinoDEApr 23, 2023Gold Contributor
Yes, there is a limit to the number of characters that can be put into a userform textbox.
The maximum number of characters that can be entered in a textbox is determined by the MaxLength property of the textbox control.
By default, the MaxLength property is set to 0, which means there is no limit to the number of characters that can be entered.
However, if you want to limit the number of characters that can be entered, you can set the MaxLength property to a specific value.
For example, if you want to limit the textbox to 100 characters, you can set the MaxLength property to 100.
Note that the maximum number of characters that can be entered in a textbox may also be limited by the available memory on your computer.
If you try to enter a very large amount of text, you may run into performance issues or other problems.
*Just copy/paste the basics from your answer 🙂