![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 48
|
Hi, I have a multiline textbox in a userform and would like to be able to:
1. Hit return for a new line. 2: Change the carriage returns to , the html version of a new line. Then copy the result into a cell. Please help I'm really stuck! |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 24
|
Hello Andy:
1. On your userform property, make sure the textbox's enterkeybehavior is set to true, this enable the enter key to generate a new line. 2. the new line character is either chr(13) then chr(10) or chr(10) then chr(13), I forget which one is the right one, but you can easily test it. just do a search and replace of both character with the html ones. example: dim strAns as string strAns = textbox1.text strAns = replace (strAns,chr(13) & chr (10),"*") 3. not sure what you mean, but it should be easy once you got the string above? HTH lantiger |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 24
|
oops, guess I should disable HTML
on the above post, where it has the replace function, it should be: strAns = replace(strAns, chr(13) & chr (10), "@nbsp;" |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
CHAR(10)
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|