Can Chr(182) or "¶" function like chr(10) or Linefeed character in a Textbox whose multiline value is False

SamDsouza

Board Regular
Joined
Apr 16, 2016
Messages
189
Hello

Why can't Chr(182) or "¶" function like chr(10) or Linefeed character ?

When anything typed in a particular cell or range of cells with ALT+Enter.

The text is broken with Lines in a cell and the same is represented in Textbox (whose Multiline Property value is set to False) is represented with "¶" after each text.

As I don’t have more space to in incorporate Textboxes with MultiLine and increase the height of textbox
Representation 1
J​
K
1
2Sam
D’souza
22

VBA Code:
StrText1= Textbox1.Text
StrText2=Textbox2.Text

With wks.Cells(2, 10)
   .Value = "(" & strText1 & ")" & Chr(10) & StrText2
End With
TextBox3.Value = wks.Cells(2, 10).Value

Textbox3.Value displayed as with above code

Sam¶ D’souza¶ 22


Now in reverse manner ie From userform Textbox to worksheet cell
i type chr(182) after each text in Textbox1 and Textbox2 ie

VBA Code:
StrText1= Textbox1.Text
StrText2=Textbox2.Text

With wks.Cells(2, 10)
 .Value = "(" & strText1 & ")" & Chr(182) & StrText2
End With
TextBox3.Value = wks.Cells(2, 10).Value

When with above code
Sam¶ D’souza¶ 22 is Typed
I get in cell
Representation 2

J​
K
1
2Sam¶D’souza¶22

and not same with LineFeed after each Text which is shown in Representation 1

This beautiful chr(182) or ¶ at least indicates where ALT+Enter has been pressed in a Cell inbetween the strings in a single Textbox whose multiline = False

Will it be possible to use chr(182) or “¶” instead of chr(10) LineFeed character in single Line Textbox so that cell in worksheet is displayed like representation 1

Your guidance and help shall be appreciated

Thanks
SamD
169
 

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,309
Office Version
  1. 365
Platform
  1. Windows
Not sure I understand, why not just use chr(10) when writing to the cell as you have shown in your 1st code?
 

SamDsouza

Board Regular
Joined
Apr 16, 2016
Messages
189
Fluff

Thanks for your immediate response.

Not sure I understand, why not just use chr(10) when writing to the cell as you have shown in your 1st code?

Indeed this was explored using chr(10).
Reason to post this thread whether possible using chr(182) because in between the string of text shows chr(182) or ¶ in a textbox.
If Cell Value with Strings and Text with INBETWEEN ALT+Enter Pressed which is displayed in a Textbox with strings and text and INBETWEEN with chr(182) or ¶.

Now in reverse way from Textbox i type text and strings and INBETWEEN with chr(182) or ¶ so that Cell Value has same represnetation 1.

Any chances
Do I need to use textbox_KeyCode Event if yes then How ?
SamD
170
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,309
Office Version
  1. 365
Platform
  1. Windows
I still don't understand, if you type abc¶123 into a textbox (using Alt 0182) then transfer that to a cell you will get a line feed.
If you are trying to concatenate two textbox values then just use chr(10)
 

SamDsouza

Board Regular
Joined
Apr 16, 2016
Messages
189

ADVERTISEMENT

I still don't understand, if you type abc¶123 into a textbox (using Alt 0182) then transfer that to a cell you will get a line feed.
If you are trying to concatenate two textbox values then just use chr(10)
I tried typing abc(alt+0182)123 in single line textbox. It did not work
also abc(alt+182)123. this also did not work
First of all How can i get the symbol ¶ displayed in textbox so that cell will receive LineFeed

SamD
171
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,309
Office Version
  1. 365
Platform
  1. Windows
Did you use the number keypad?
 

SamDsouza

Board Regular
Joined
Apr 16, 2016
Messages
189

ADVERTISEMENT

Did you use the number keypad?
I am using normal Keyboard
Though I presssed ALT holding on it and typing 0182 or 182

SamD
172
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,712
Office Version
  1. 2010
Platform
  1. Windows
You must use the Number Keypad for the ALT+0182 to work.
 

SamDsouza

Board Regular
Joined
Apr 16, 2016
Messages
189
You must use the Number Keypad for the ALT+0182 to work.
Fluff and Rick
I've my normal laptop where there are alphabets, number keys from 0 to 9 above the number keys are symbols from !to )
for Fkeys ive to use Fn key hold it and press respective F1 to F12 keys

If ive to open VBA editor i've to Press and hold Fn + ALT key+ F11 rather than ALT+F11

Is the Number Keypad different from above what is mentioned

Kindly guide me
173
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,309
Office Version
  1. 365
Platform
  1. Windows
The number keypad is normally to the right of the main keypad, although I don't think all laptops have that.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,341
Messages
5,601,063
Members
414,427
Latest member
fraru

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
Top