Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Delete enter key rectangles in a cell.

I am using a Textbox on a form to enter data into a cell.

Code:
ActiveCell=UserForm1.TextBox1.Text

When the user presses ENTER in the TextBox small rectangles appear in the
cell.
How do I prevent this happening?

Thanks for any help!

OS is XP and Excel 2003
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Delete enter key rectangles in a cell.

It's very hard to suggest anything with so little information, eg what's the
state of MultiLine & WordWrap in the textbox and WordWrap in the cell, what
occurs when user presses Enter (normally that will simply exit the text
box), or is that control enter, where is the code (in which event), etc, etc

here's a long shot guess

ActiveCell = Replace(Me.TextBox1.Text, vbCrLf, vbLf)

Regards,
Peter T

"Maths1" wrote in message
...
I am using a Textbox on a form to enter data into a cell.

Code:
ActiveCell=UserForm1.TextBox1.Text

When the user presses ENTER in the TextBox small rectangles appear in the
cell.
How do I prevent this happening?

Thanks for any help!

OS is XP and Excel 2003



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Delete enter key rectangles in a cell.

Thank you for the prompt reply.

Your long shot was a direct hit - Fantastic!
The textbox EnterKeyBehaviour, MultiLine & WordWrap are set to TRUE and also
WordWrap in the cell. The user transfers the text to the Sheet using a
CommandButton click event.

Many thanks again

"Peter T" wrote:

It's very hard to suggest anything with so little information, eg what's the
state of MultiLine & WordWrap in the textbox and WordWrap in the cell, what
occurs when user presses Enter (normally that will simply exit the text
box), or is that control enter, where is the code (in which event), etc, etc

here's a long shot guess

ActiveCell = Replace(Me.TextBox1.Text, vbCrLf, vbLf)

Regards,
Peter T

"Maths1" wrote in message
...
I am using a Textbox on a form to enter data into a cell.

Code:
ActiveCell=UserForm1.TextBox1.Text

When the user presses ENTER in the TextBox small rectangles appear in the
cell.
How do I prevent this happening?

Thanks for any help!

OS is XP and Excel 2003




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get Excel to enter a cell and delete the last character typed? [email protected] Excel Programming 1 January 3rd 07 12:26 AM
loop through rectangles on worksheet jeichhold via OfficeKB.com Excel Programming 3 June 27th 06 02:42 PM
How do I enter a formula that will delete a line when a cell = 0? Jen Excel Worksheet Functions 1 April 11th 06 06:21 PM
Clearing rectangles Andrew B[_5_] Excel Programming 1 April 6th 06 12:46 AM
Determine if cell was modified by Enter , Paste or Delete Randy Excel Programming 3 April 30th 05 04:17 PM


All times are GMT +1. The time now is 08:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"