Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default 2 small problems

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default 2 small problems

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default 2 small problems

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
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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
SMALL IF Adam Excel Discussion (Misc queries) 4 October 2nd 09 01:46 PM
ISERROR,SMALL,INDEX, MATCH, SMALL?? M.A.Tyler Excel Discussion (Misc queries) 1 May 2nd 07 04:08 AM
Using Small PH NEWS Excel Worksheet Functions 2 July 27th 06 09:22 AM
Office Small Business ver. 2003 has problems running in XP pablo5551 Excel Discussion (Misc queries) 0 April 26th 05 02:14 AM


All times are GMT +1. The time now is 12:43 PM.

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

About Us

"It's about Microsoft Excel"