Line-breaks in Userforms freezes Excel

shanilkarunananda

New Member
Joined
Jan 6, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Am using userforms on a spreadsheet to populate content to cells within a worksheet. The links are working perfectly and the data is being copied across precisely, from the userform to the cell and visa versa.
However, when a line-break is added (ALT+ENTER on the worksheet / ENTER on the userform) at any point, Excel freezes once I exit the cell or click away from the userform text box. This occurs when adding line-breaks on any text box on the userform.

I have removed all coding on the worksheet but the above issue persists; hence, not related to the coding.

Anyone able to help?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
welcome to the forum

Does the problem happen if you do this?
... open NEW workbook
.......enter something in a cell
.......... add a line break with {ALT}{ENTER}
 
Upvote 0
Cheers for the welcome!
Happens when I add a line break in the userform text box / cell to which the userform text boxes are linked.
 
Upvote 0
We are both using 365 - but I cannot replicate your problem as picture below illustrates
I can insert line breaks either in the textbox (enter) or if I enter directly in the cell (alt enter)

Am I doing something different to you?

This is what I am doing
- Insert Active-X textbox on the worksheet
- Link to cell
- Enter behaviour set to TRUE
- Multiline set to TRUE


ActiveXTextBox.jpg
ActiveXTextBox.jpg
 
Upvote 0
I'm using Userforms which is embedded within VB, which is then linked to cells on the tab. Have attached the where the form sits within the VBA, as well as the properties of the said text box.

Thanks.
 

Attachments

  • Userform.PNG
    Userform.PNG
    15.5 KB · Views: 17
  • Properties.PNG
    Properties.PNG
    26.2 KB · Views: 14
Upvote 0
Again I cannot replicate your issue

I named cell A4 LinkedCell
UserForm Linked Cell.jpg


I used that as control source property for the textbox in the useform
EnterKey behaviour = TRUE
Multiline = TRUE

UserFormProperties.jpg

And displayed the userform
... placed text with linebreaks (enter) in TextBox
... closed userform
... added text with linebreaks (alt enter) in cell A4
... displayed the userform

The link works and the text contains the correct line breaks in BOTH cell and textbox
UserFormLinkedTextBox.jpg
 
Upvote 0
Close Excel completely

Open a NEW workbook (must be NEW!)
Do ONLY what I did above
- Create Named Range LinkedCell with refers to = A4
- Create a UserForm
- Add textbox amending only ...
. ControlSource LinkedCell
. EnterKey behaviour TRUE
. Multiline TRUE

Display the userform and test

Does EXCEL crash this time ?
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top