Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to display some tab delimited data in a textbox.
The text box is not wide enough to see all the data. I have a vbCrLf at the end of each record. So my text box is being populated like this: For I = 1 to alot TB_output = TB_output & data1 & vbTab & data2 & ...... & vbCrLf Next alot I have scroll bars turned on and multiline = true However it wraps data to the next line in the textbox before the vbCrLf statement and at the vbCrLf. The scroll bar is NOT displayed If I turn multiline to False I get the scroll bars to appear but data is all on one line and the vbcrlf is displayed as a character. How do I see multiline data and horizontal scroll bars using vbCrLf I may have too many lines to put into a list box. Plus I want the option to copy and paste data easily in the future |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I follow, you want the right edge of the multiline brak to the right of
the visible width of the text box. Seems to defeat what MultiLine provides, but here are a couple of ideas for what I think you might be after - 1. Place your line-breaks where you want the (use vbLf rather than vbCrLF) MultiLine = True and WordWrap = False 2 Set the width of the Textbox to the overall width you want to scroll to (ie wider than you want it to appear on the form) MultiLine = True, WordWrap = true Size a Frame to the visible size you want for your textbox, a little taller to allow for the H-scroll. Remove the frame's caption Cut the Textxbox, select the frame, and paste into the frame. Position to top-left corner of the frame. Add the horizontal scrollbar to the frame and set its scrollwidth to that of the width of the textbox (might need to adjust slightly), eg With Me.Frame1 ..TextBox1.Left = 0 ..TextBox1.Top = 0 ..ScrollWidth = .TextBox1.Width End With Regards, Peter T "gtslabs" wrote in message ... I am trying to display some tab delimited data in a textbox. The text box is not wide enough to see all the data. I have a vbCrLf at the end of each record. So my text box is being populated like this: For I = 1 to alot TB_output = TB_output & data1 & vbTab & data2 & ...... & vbCrLf Next alot I have scroll bars turned on and multiline = true However it wraps data to the next line in the textbox before the vbCrLf statement and at the vbCrLf. The scroll bar is NOT displayed If I turn multiline to False I get the scroll bars to appear but data is all on one line and the vbcrlf is displayed as a character. How do I see multiline data and horizontal scroll bars using vbCrLf I may have too many lines to put into a list box. Plus I want the option to copy and paste data easily in the future |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Untested: In the Text box properties try setting the EnterKeyBehaviour to
True. This is the property that allows the use of the enter key for the next line when entering text manually. -- Regards, OssieMac "gtslabs" wrote: I am trying to display some tab delimited data in a textbox. The text box is not wide enough to see all the data. I have a vbCrLf at the end of each record. So my text box is being populated like this: For I = 1 to alot TB_output = TB_output & data1 & vbTab & data2 & ...... & vbCrLf Next alot I have scroll bars turned on and multiline = true However it wraps data to the next line in the textbox before the vbCrLf statement and at the vbCrLf. The scroll bar is NOT displayed If I turn multiline to False I get the scroll bars to appear but data is all on one line and the vbcrlf is displayed as a character. How do I see multiline data and horizontal scroll bars using vbCrLf I may have too many lines to put into a list box. Plus I want the option to copy and paste data easily in the future |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remove small square caused by vbCrLf | Excel Programming | |||
Deleting a row in a message (opposite to VbCrLf) | Excel Programming | |||
VBCRLF not doing anything | Excel Programming | |||
Automatic linewrap with formulas displayed | Excel Worksheet Functions | |||
square boxes when using vbcrlf | Excel Programming |