Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi.
I have a txtbox (with multiline) on a userform where the user can write comments to a cell (excel sheet). My problem is this: If the user wants to change line in the txtbox by using enter a square emerge at the end of the line in the sheet. Is it possible to remove that square? Is there a vb code that makes it possible to draw in a txtbox (lines, circles etc.) and return the drawing into a cell? -- Nil Satis Nisi Optimum |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Michael,
Here's a copy of an answer I made to someone else with the same problem: <<I suspect this is because the new lines in the textbox are created with a carriage return and line feed (CHR(13) & CHR(10)) whereas the Excel cells just use a line feed (CHR(10)). (Although I can't recreate the problem you experience manually.) You can clean out the CHR13s by using Replace e.g. cells("A1") = replace(cells("A1"),vbcr,"") Replace is only available in Excel 2000 and greater. (You can use athe worksheet function replace if you're running XL97). Note however you don't need to do this if you don't copy text and use code such as: Cells(1, 1) = TextBox3.Text to place the text directly in a cell. With respect to drawing in a text box.... I have never heard of such a control. Off the top of my head, a very poor workaround: You could shell out to pbrush.exe (maybe dictate the filename?). Pop up a msgbox saying "click me when you've finished and saved your drawing" and then load the image up in your userform when they click ok. I also notice something called Microsoft InkPicture control on my toolbox that might do exactly what you're looking for. I've never used it though. HTH, Gareth Michael wrote: Hi. I have a txtbox (with multiline) on a userform where the user can write comments to a cell (excel sheet). My problem is this: If the user wants to change line in the txtbox by using enter a square emerge at the end of the line in the sheet. Is it possible to remove that square? Is there a vb code that makes it possible to draw in a txtbox (lines, circles etc.) and return the drawing into a cell? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank's Gareth
-- Nil Satis Nisi Optimum "Gareth" wrote: Hi Michael, Here's a copy of an answer I made to someone else with the same problem: <<I suspect this is because the new lines in the textbox are created with a carriage return and line feed (CHR(13) & CHR(10)) whereas the Excel cells just use a line feed (CHR(10)). (Although I can't recreate the problem you experience manually.) You can clean out the CHR13s by using Replace e.g. cells("A1") = replace(cells("A1"),vbcr,"") Replace is only available in Excel 2000 and greater. (You can use athe worksheet function replace if you're running XL97). Note however you don't need to do this if you don't copy text and use code such as: Cells(1, 1) = TextBox3.Text to place the text directly in a cell. With respect to drawing in a text box.... I have never heard of such a control. Off the top of my head, a very poor workaround: You could shell out to pbrush.exe (maybe dictate the filename?). Pop up a msgbox saying "click me when you've finished and saved your drawing" and then load the image up in your userform when they click ok. I also notice something called Microsoft InkPicture control on my toolbox that might do exactly what you're looking for. I've never used it though. HTH, Gareth Michael wrote: Hi. I have a txtbox (with multiline) on a userform where the user can write comments to a cell (excel sheet). My problem is this: If the user wants to change line in the txtbox by using enter a square emerge at the end of the line in the sheet. Is it possible to remove that square? Is there a vb code that makes it possible to draw in a txtbox (lines, circles etc.) and return the drawing into a cell? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
SMALL IF | Excel Discussion (Misc queries) | |||
ISERROR,SMALL,INDEX, MATCH, SMALL?? | Excel Discussion (Misc queries) | |||
Using Small | Excel Worksheet Functions | |||
Office Small Business ver. 2003 has problems running in XP | Excel Discussion (Misc queries) |