Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




I Need Help About To Read Carriage Return–linefeed


i wanto to knew how i can read a carriage return–linefeed from a varchar

i have this and it dont works:
If RTrim$(Mid$(AV10Var, AV80Yyy, 1)) = vbCrLf Then
AV56Ok1 = AV56Ok1 + 1
Else
AV57Varxx = AV57Varxx & Mid$(AV10Var, AV81Yyy, 1)
End If

i also tried whith char(13), char(10)...
please
help me




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Need Help On Carriage Return And Linefeed Char
Hi,

I have some text files where every line of the text end with
1 or 2 Carriage Return <CR> characters followed by 1 Linefeed
<LF> character.

I use "Line Input" statement to read the text in the file,
put it into an array, make some changes in the array,
then write the content in the array to another new text
file using the "Print" statement.

For text files where every line of the text end with
1 <CR> characters followed by 1 <LF> character (<CR><LF>), the new text file is written correctly.

The problem come for text files where every line of the text end with
2 <CR> characters followed by 1 <LF> character (<CR><CR><LF>). In the new text file,
there is always another extra new empty line printed between each line.
When I convert the text file to ascii code, I realise that every line
is end with two <CR><LF> (that is <CR><LF><CR><LF>).

Is it possible to get back <CR><CR><LF> ?

Is it possible to determine which text files has lines
end with <CR><LF> or <CR><CR><LF> ?

I have been solving this problem for quite some time, can
anyone help?

Thanks a lot !

Need Help On Carriage Return And Linefeed Char
Hi,

I have some text files where every line of the text end with
1 or 2 Carriage Return <CR> characters followed by 1 Linefeed
<LF> character.

I use "Line Input" statement to read the text in the file,
put it into an array, make some changes in the array,
then write the content in the array to another new text
file using the "Print" statement.

For text files where every line of the text end with
1 <CR> characters followed by 1 <LF> character (<CR><LF>), the new text file is written correctly.

The problem come for text files where every line of the text end with
2 <CR> characters followed by 1 <LF> character (<CR><CR><LF>). In the new text file, there is always another extra new empty line printed between each line. When I convert the text file to ascii code, I realise that every line
is end with two <CR><LF> (that is <CR><LF><CR><LF>).

Is it possible to get back <CR><CR><LF> ?


Is it possible to determine which text files has lines
end with <CR><LF> or <CR><CR><LF> ?

I have been solving this problem for quite some time, can
anyone help?


Thanks a lot !

Help With Carriage Return And Linefeed Characters
I'm using Visual Basic 5.0 which I know doesn't have the Replace
Function ability. I have a user form with 12 textboxes that can have
multiple lines of data in each textbox, which I then send each boxes
data to it's appropriate DOCVARIABLE in a Word doc. When I open the
Word doc I see little square boxes representing carriage return or
line-feed characters, I'm not sure which ones they are. What's a good
way to get rid of the all the carriage return or line-feed characters,
so they don't appear in the Word doc.? And, the second part of my
question is when I retrieve the DOCVARIABLE data from the Word doc and
send it back to its appropriate textbox in the userform, it displays a
"|" (pipe symbol in UNIX) wherever the carriage or linefeed character
was in the textbox. So, what's a good way to get rid of that symbol??
Basically, I'm sending data from textboxes on a userform to
DOCVARIABLES in a Word doc. and then back. I'm using the Word doc.
DOCVARIABLES to store information that's updated numerous times in a
day using the userform. I hope someone can help me with this problem.

Help With Carriage Return And Linefeed Characters
I'm using Visual Basic 5.0 which I know doesn't have the Replace
Function ability. I have a user form with 12 textboxes that can have
multiple lines of data in each textbox, which I then send each boxes
data to it's appropriate DOCVARIABLE in a Word doc. When I open the
Word doc I see little square boxes representing carriage return or
line-feed characters, I'm not sure which ones they are. What's a good
way to get rid of the all the carriage return or line-feed characters,
so they don't appear in the Word doc.? And, the second part of my
question is when I retrieve the DOCVARIABLE data from the Word doc and
send it back to its appropriate textbox in the userform, it displays a
"|" (pipe symbol in UNIX) wherever the carriage or linefeed character
was in the textbox. So, what's a good way to get rid of that symbol??
Basically, I'm sending data from textboxes on a userform to
DOCVARIABLES in a Word doc. and then back. I'm using the Word doc.
DOCVARIABLES to store information that's updated numerous times in a
day using the userform. I hope someone can help me with this problem.

Carriage Return
Very late/early
need sleep
quick dumb stupid question


What the Vb command for a Carriage return in a lable name LblDescription?
vbCR or something?

Carriage Return
hello !!

i'm trying to read a "memo" data type and write it to an asp.NET page. i would like to use a replace function to replace the carriage returns by "<br>".

however i don't know the C# constant for carriage return. i think it's vbCr in VB.NET, but i can't find the C# equivalent.

if anyone knows, thanks for letting me know

huby.

Carriage Return
How can I stop a user from pressing the carriage return / enter button when typing in a textbox?

I tried checking for chr13 but not sure how to stop the user from hitting it accidetly.


thanks

Carriage Return
Whats the vb keyword for a carriage return?
Ie Text1.Text = "Blah" + CR + "Blah"
What do I change CR to?


Thanks in advance

Return Carriage
Im doing a simple text filtering program. user enters info and... fo rexample it will pick out the words begining with b's. im using a multiline textbox for input. how do i get the program to recognize a carriage return if the user decides to sperate the words by hitting enter?

right now i am taking the text box and reading it as 1 string. it recognizes blanks to seperate the words.

it is a college project so i understand how over simplified it is. however the info is useful




Private Sub cmdFindBs_Click() 'main program

'declare local variables
Dim Words As String, NextWord As String
Dim blank As Integer, Foo As Integer

Words = txtInput.Text 'get text from textbox
blank = InStr(1, Words, " ") 'find first blank

While blank <> 0 'continue until no more blank spaces
NextWord = Left$(Words, blank - 1) 'isolates word
If SeeIfB(NextWord) = True Then
'checks if word begins with b
lstDisplay.AddItem (NextWord) 'add word to lstbox
End If

'trims string of first word
Words = Right$(Words, Len(Words) - blank)

'find next blank
blank = InStr(1, Words, " ")

Wend

'handles last word
NextWord = Words
If SeeIfB(NextWord) = True Then
lstDisplay.AddItem (NextWord)
End If

End Sub


Private Function SeeIfB(ThisWord As String)
Dim B As String 'declare local variables

B = Left$(ThisWord, 1) 'if word begins w/ b return true
If B = "b" Or B = "B" Then
SeeIfB = True
Else 'else return false
SeeIfB = False
End If

End Function

Carriage Return
How do I force a carriage return in a text box in between strings?
This is my code

If optMenu = 0 Then
txtChoice.Text = cboRegularStarter.Text
txtChoice.Text = cboRegularMain.Text

etc.

How can I force "txtChoice.Text = cboRegularMain.text" to be printed on a new line underneath "txtChoice.Text = cboRegularStarter.Text"

I would appreciate any help on this one. it is probably a very simple solution and I am just being stupid.

Thanks.

Carriage Return In VB
Can I perform a search on a string and do a replace with a carriage return character and create different lines within the file.. (to allow for records to be separated)

Carriage Return.....
If I have a string that is 100 words(not characters)long, is there a way when that string (from a rich text box) is printed or emailed to determine where the carriage return will happen and that on the next line to add spaces before the rest of the string for an indention? Hope this makes sense.
Cady

Carriage Return In VB
Hi All,

I have created a script that parses throught a file with a fixed length row
of data. I am using the TextStream to write certain data to another file
that will be processed through another application. The trouble that I am
experiencing is that at the end of the file, it is writing an extra CrLf
which when it runs through the application, chokes. Any information or
hints on alternatives would be very much appreciated.

Thank you in advance....

Kevin Baker
S/W Applications Developer I
Mutual of Enumclaw Ins. Co
(800)366-5551 x3471

Carriage Return In Field Value
Hello. I have a form set up. I have read in values from a text file and assigned them to variables. The form is a Fax. In the "From" field, I want to put:

Name
Title
Department

Only problem is, I only want the Title and Department to show up IF they are not blank. I'm trying to combine all three into one string or variant variable and then assign that variable as the "result" of the field. It looks like:


Code:
ActiveDocument.FormFields("Name1").Result = inName1 & vbCrLf & inDept1
If I use "vbTab", it works fine, but when I use "vbCrLf," I get a box instead of a carriage return... its the same type of box you get when you're looking at font substitution and the program places a box in the places of a character it doesn't know how to substitute. Any suggestions???... aside from separating these into separate fields?

Remove Carriage Return
I have imported data which has cells with squares in them representing carriage returns. I recorded a macro to replace "xxxx" with a space and then changed the:

What: = "xxxx" with
What: = chr(13)

This did not work. I can't use clean because that will just remove the carriage return whereas I need it to be replaced with a space.

thanks

How To Get Rid Of Those Carriage Return Boxes?
I take the text from a text box which has enters in them.

485 Rural Drive*
Toronto, Ontario*
M6R 7F7


I get little squares where the stars are. Ive read that they are ascii characters or line return characters. Whatever they are i need to get rid of them. Any solutions or links to other posts? Thanks!!!

Carriage Return In Textbox
Does anyone know how to insert a carriage return in a textbox using the keyboard. I thought it was Ctrl+Enter or Shift+Enter... but no luck.

Thanks,

Marcie

Carriage Return For Notepad
Hello all,

I am using VBA to write a program in excel, at the end of which is a program that writes an error report to a text file in notepad. There are already preprogrammed strings that are passed into this function and then simply output as strErrors for example. I was wondering how I can get a carriage return in this string that is passed into the error function. I have tried to use Chr(8), but it just shows up as a block in the text file. That is the only carriage return I know in VBA.

Thanks!

KUBBALL

Opposite Of Carriage Return
Hi All!

I sending strings to a text box like this

AbC: 123
CDE: 456
FGH: 789
*

and i do it by adding a carriage return after my string
Now the cursor is at the (*) and i want to go back up one line and delete the FGH: 789 .. i did learn how to delete using (len) but i dont know how to go back up one line.. please help!!


thank you

Carriage Return In A String!
I know this is an easy question but... In a string how do you insert a carriage return or new line character??? I know it is a VB constant but I don't know which one. I am using it in a message box to move down to the next line.

Carriage Return(enter Key)
hi you all

can anybody help!!

I'm trying to check for the enter key been pressed and for some reason it does not work. if I change the 13 to 32(space bar) it works fine what i'm i doing wrong.

All i want to do is change the updown1(control) to the value of the Text1.Tex(control).


Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
response = MsgBox("dsdf", vbOKOnly, "dfg") 'just to see if it works
UpDown1.Value = Val(Text1.Text)
KeyAscii = 0
End If
End Sub
thanks the pig

Immediate Carriage Return In Listboxes
I'm not sure if it's possible, but is there a way to have a command enter a return after a statement is added to a listbox, so that the next line entered is on that line? I've been doing it with bunches of spaces and MultiLine set True, but that just seems to make a mess.

Thanks

Parsing Looking For Carriage Return
I am loading in a string that contains several ascii representations of the Carriage Return. How would I parse through it and where the Carriage Return Ascii is replace it with a vbCrLf.

I am not good at parsing at all, in fact its my weakest areas...



So here is my example to the best of my ability without knowing the ascii code for the carriage return.

hello world||I am doing fine||hope you are too

Now I want to take that string and parse it so I can place it into a Textbox so it looks like this:

hello world
I am doing fine
I hope you are too

Carriage Return Replacement
I have another newb question for you guys. I have a form variable (txt_textfield) which the user enters information into as a comma (,) delimited list. Problem is that when I load this list into an array, the carriage returns, spaces, and such are getting sent with the value. I am looking for a way to remove all spaces in the string and all carriage returns.

Replace(txt_textfield, " ", "") should get rid of the spaces.

but how do I remove all carriage returns and line feeds?

Carriage Return In ToolTipText
Good Day,
I wa wondering if it was possible to jump a line when editing the ToolTipText attribute of an object at runtime.

Chr(13) & Chr(10) does not work

Many Thanks

Checking For Carriage Return
I have a text file that i loop through....at the end of the file is a carriage return. I need to check for that.

I have been doing this to check:


Code:
If Val(Transaction.MachineNum) = Val(vbCrLf) Then
'DO SOME PROCESSING
End If

This worked fine until I realized that I need to error check for Transaction.MachineNum. If Transaction.MachineNum has an alphabetical character in it...then the Val function sets it to 0. and Val(vbcrlf) is also 0.....so this is a problem.

Is there some other way to check for a carriage return?

thanks,

b

Email && Carriage Return
Hi,

I have read through various messages on this topic, but can't seem to find the answer I'm looking for.

Basically, I need to create an email from various information calculated and displayed in numerous textbox in VB.

I have no problems creating the email, but when it comes to the carriage return (or changing lines) I can't seem to getting it to work

The code I have been playing with was posted previously, and works great, but like I mentioned the carriage return bit has me stumped.

[[[[ code ]]]]

Private Sub Command1_Click()

Dim objOutlook, objMsg, objNameSpace, objFolder, strOutput, strSubject, StrTo, StrMsg, Strcc
StrTo = "me@abc.com"
Strcc = "you@123.com"
Const olMailItem = 0
Set objOutlook = CreateObject("Outlook.application")
Set objNameSpace = objOutlook.GetNameSpace("MAPI")
Set objMsg = objOutlook.CreateItem(olMailItem)
objMsg.To = StrTo
objMsg.Cc = Strcc
objMsg.Display
objMsg.Subject = "This is my Title"
objMsg.body = "this data on 1st line"
' ## now this is were I get stumped, how do I get the following
' ## information on a different line.
objMsg.body = "this data on 2nd line"
objMsg.body = "this data on 3rd line"
objMsg.body = "this data on 4th line"
objMsg.body = "this data on 5th line"
Set objFolder = Nothing
Set objNameSpace = Nothing
Set objOutlook = Nothing
Set objMsg = Nothing
Set ss = CreateObject("WScript.Shell")
Set ss = Nothing

End Sub

Thank-you for your help, I guess the solution is simple, but I can't seem to find it any where.

Thanks Again & Rgds,
Dan.

How To Insert A Carriage Return
Hi.

I am making a evaluation form. In this evaluation form you can insert opinions.

In the administrative form, you can see the evaluation of one day or the evaluation of several days.

When you choose the evaluation of several days, i need to display from the database all the opinions in that days.

I will display all the opinions in a textbox with the multiline option avaliable and the scroolbar.

But how can i make to display the first opinion and then insert a carriage return, but i need to make this in code.

My code is something like that


text1.text = rs("date") & " :" & rs("opinion") & 'here the carriage return.

I know is so simple the answer but i don´t know how to do it.

Regards.

Efrain Israde
Mexico City

Delete Carriage Return
how do i delete a carriage return?
when i open notepad i'm unable to see the carriage return's symbol
i wan my cursor to stay at the end of the file

Carriage Return In A Label
Hi.

How do I denote a carriage return in a label?

For example, lblText.caption = "


TEXT APPEARING HERE


"

Thanks,

David

Detect Carriage Return
I start this topic as a new thread, in a multiline textbox, is there a way to detect carriage return?
or when reading a line from txt file, how to detect whether cr exists in that line of string?

Carriage Return Character
I am writing multiline text data into a database then transferring the data into an Excel report template, but anytime I have a multiline entry the printout includes a carriage return identifier. It looks like this:

-Data1|
-Data2|
-DataDataData|
-Data3

Anyone know why this is and how to remove or disable it?

End Of Line And Carriage Return
Hey guys,

I am reading data from a .csv file into a text box. In the textbox columns are seperated by commas but the rows are seperated by a character that I do not recognize-it looks like two pipe symbols "||". I think it may be a carriage return or end of line symbol. I want to search this string for a particular instance of this character but I don't even know what the char is and I can't copy and paste it from my text box to my Instr() function as it only advances the cursor to the next line when I do. Does any one know what the correct syntax for this character?

Carriage Return Problems
Hi have written a small application that has a few text boxes for outputs, the output looks like this: 1.jpg

when i print it out the printer recognizes the carriage return in the text boxes and will print out a long line over 2 pages, instead of across the page like it should.

If i enter text manually without a carriage return it will print out across the page, i have tried to use vbNewLine instead of vbCrLf but its still the same, has anyone any ideas as to how i can make the printer recognisze a new line only after the carriage return on last text box?

If i tried:

text3.text = text3.text
text4.text = text4.text etc....
Would this remove the carriage returns? (havent tried it yet as im about 5 hours away from my printer!!)

Thanks

Text Box With Carriage Return
hello all,

I wanna create a text box once i display a text on it the format should look like this,

text1
test2
test3

i can do this by using the textbox property MultipleLine=true

but i'm wondering if it's possible to do this by code.

for example i have a table. in a table i have ID# & text fields
in ID# I have two records with same ID (not primarykey & allow duplicate) and Text field i have 2 diff text, let say tex1 & text two.

i create a recordset querying by ID#. i want to display the TEXT field in textbox showing all the data...

i hope this is clear.


i am hoping to have same result as i mention above. i have a codde. i don't know if this will help...

code sample:
================================

Dim strSelected As String
Dim i As Integer, strItems As String

gstrSelected = Me.lstTransID.List(lstTransID.ListIndex)

SQL = "select * from tblShipping where TransID='" & gstrSelected & "'"
Set RS = DB.OpenRecordset(SQL)

'Always clear the textboxes
Me.txtReceiver = ""
Me.txtItems = ""
Me.txtWaybill = ""

'Assign the value from recordset
Me.txtReceiver = RS.Fields("Receiver")

strItems = ""
RS.MoveLast
RS.MoveFirst
For i = 1 To RS.RecordCount
'strItems = RS.Fields("ItemDescription")
strItems = strItems & RS.Fields("ItemDescription") & Chr(13)
RS.MoveNext
Next
Me.txtItems.Text = strItems

Carriage Return - VbCr
How do you get a carraige return to MSWord output?

I am using...

VB Code:
FrmEndsSz = "something" & vbCrlf &  "something next line"

but the document is returning two squares where the carriage return should be.

When I use...

VB Code:
FrmEndsSz = "something" & vbCr &  "something next line"

but the document is returning one square where the carriage return should be.

Writing A Carriage Return
I am trying to put a carriage return at the end of a text file that I am generating. Cannot get it to work.

I am trying

if rsSource.eof = true then

print #ifilenum, ASC(13)

end if

this prints 49 at the eof and inserts a carriage return


I also tried:

if rsSource.eof = true then

put #ifilenum, ,ASC(13)

end if

this does not work.

Thanks

Carriage Return Constant
Can anyone tell me what the VB constants for cariagereturn and linebreak are? Its something like crrtn, but I can't remember for sure... Thanks

Delete Carriage Return
I am reading from a file and writing to another file.
I am getting an extra carriage return, after reading
from source. How could i delete extra carriage
return at end of the file.

Any light shed would be helpful.

Thanks in advance

Carriage Return In A Textbox
I want to send a string with a carriage return to a multiline textbox. Example,

Text1.Text = "Hello World" + chr$(13) + "Bye"

The carriage return shows an odd character instead of returning to a new line.

Any suggestions

Missing Carriage Return
I'm having a very strange problem with an application. This program has been running without problem for years and I've just released a new version. As part of its execution it creates a simple comma-delimeted file (although with its own extension of .BMD), it opens the file for output and prints mutiple lines to it using "Print #Fileno, sLine" where sLine is a string variable in which the comma-delimited fields have been concatenated.
When I examine the file, the previous version of the program created lines terminated by Carriage Return Linefeed (as I would expect), the new version somehow is missing the Carriage Return so each line ends only in a Linefeed. This causes chaos when the program tries to open the file again next run as it can't read the lines properly.

To make this problem even stranger, it doesn't happen on every PC. It doesn't happen on my pc nor on some others that I've tried this out on, but there are definitely some PC out there where it is happening and I have been sent example files. So far I can't find a commonality between the pc's where it happens, indeed I don't really know where to start looking!

The print statement writing this file hasn't changed at all from the previous version and I have absolutely no idea why it should be missing the CR, or even how it could omit it with the simple Print statement. Does anyone have any ideas please??

Thanks
Ian

Carriage Return In Text Box
I wish to program a text box with the result of dropdown menus when a command button is pressed. I have managed to write to the text box but a cannot force a carriage return ready for the next input, please help. Jason

Excel And Carriage-return
Hi,

I tried to write some text to an Excel cell using Excel Object Library,
and all Carriage-returns in my Text become squares characters in Excell cells.

How can I get rid of those squares, but still having Carrigage-returns in my Texts ?

Thanks

Carriage Return In Excel {combobox}
I'm an idiot and just want to add a combo box to an excel sheet so that each column has a drop down list of choices. I want the focus to jump to the next cell down the next time that button is pressed though. This is building a list of action items and some of the constants in each colum will be resource, construction division, etc. So I need each row to stay but to be able to use the buttons for each advancing cell. I know this is prob as easy as adding a cr in the vb mode, but like I said....

Keys To DOS Box (Specifically A Carriage Return)
Well, I'm at wit's end. If attempting to a control a DOS program via a VBA Module in Excel and am having mixed luck. I starting out using keybd_event (which had been successful in my previous dealings) but failed with this executable. (Side question: are not all DOS exe's run inside of Windows handled the same way? Why would keybd_event work on some and not others?)

I an event, I ended up placing the code below in a seprate module (module name = SendAKey) and so I envoke it from the main page using SendAKey.SendAKey ("i") where i is the character I'm sending. While I can get that to work, I CAN NOT for the life of me send a carriage return/enter. I am trying to run through a DOS code that required 3 or 4 inputs and I have to input the letter/number and after each one press Enter to go to the next. Any help that could be provided would be greatly appreciated, as I'm not exactly sure what to do from here.

Thanks in advance,

Jonathan


Code:
Public mvarDestination As Long 'local copy
Public Const KEYEVENTF_EXTENDEDKEY = &H1
Public Const KEYEVENTF_KEYUP = &H2
Public Const VK_SHIFT = &H10
Public Declare Function OemKeyScan Lib "user32" (ByVal wOemChar As Integer) As Long
Public Declare Function CharToOem Lib "user32" Alias "CharToOemA" (ByVal lpszSrc As String, ByVal lpszDst As String) As Long
Public Declare Function VkKeyScan Lib "user32" Alias "VkKeyScanA" (ByVal cChar As Byte) As Integer
Public Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long
Public Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Public Sub SendAKey(ByVal keys As String)
Dim vk%
Dim shiftscan%
Dim scan%
Dim oemchar$
Dim dl&
Dim shiftkey%
' Get the virtual key code for this char
' acter
vk% = VkKeyScan(Asc(keys)) And &HFF
' See if shift key needs to be pressed
shiftkey% = VkKeyScan(Asc(keys)) And 256
oemchar$ = " " ' 2 character buffer
' Get the OEM character - preinitialize
' the buffer
CharToOem Left$(keys, 1), oemchar$
' Get the scan code for this key
scan% = OemKeyScan(Asc(oemchar$)) And &HFF
' Send the key down
If shiftkey% = 256 Then
'if shift key needs to be pressed
shiftscan% = MapVirtualKey(VK_SHIFT, 0)
'press down the shift key
keybd_event VK_SHIFT, shiftscan%, 0, 0
End If
'press key to be sent
keybd_event vk%, scan%, 0, 0
' Send the key up
If shiftkey% = 256 Then
'keyup for shift key
keybd_event VK_SHIFT, shiftscan%, KEYEVENTF_KEYUP, 0
End If

'keyup for key sent
keybd_event vk%, scan%, KEYEVENTF_KEYUP, 0
End Sub
Public Sub SendString(ByVal keys As String)
Dim x&, t As Integer
'loop thru string to send one key at a t
' ime
For x& = 1 To Len(keys)
'activate target application
AppActivate (mvarDestination)
'send one key to target
SendAKey Mid$(keys, x&, 1)
Next x&
End Sub
Public Property Let Destination(ByVal vData As Long)
'used when assigning a value to the prop
' erty, on the left side of an assignment.
'
'Syntax: X.Destination = 5
mvarDestination = vData
End Property
Public Property Get Destination() As Long

'used when retrieving value of a propert
' y, on the right side of an assignment.
'Syntax: Debug.Print X.Destination
Destination = mvarDestination

Carriage Return And Line Feed
Hi,

I'd like to know how to insert a carriage return and line feed on a frmDisplay from frmMain. This is my code to insert carriage return and line feed. frmDisplay contains txtDatalog.

frmDatalog.Show

With frmDatalog

.txtDatalog.Text = .txtDatalog.Text & "IFR Datalog for DUT " & k & Chr$(13) & Chr$(10)
.txtDatalog.Text = .txtDatalog.Text & DLogStr(k)


End With

by the way, DLogStr(k) is a string that contains Chr$(13) & Chr$(10) at the end of each line.

Carriage Return In A .bat File = Not Good !!! Please Help
hello
i am using the command Print to create my .bat file but the command Print does a carriage return and its avoiding my program to work well

Is there a way to remove that return or simply avoid it ?

Print# Statement And Carriage Return
Hopefully not too difficult, this one (I hope!)

Consider:

open "c:myfile" for output as #1
print #1, "Line 1"
print #1, "Line 2"
close #1

This effectively creates a text file with THREE lines, because the Print Statement includes a carriage return after line 2.

How can I avoid having this last carriage return, or remove the carriage return subsequently?

TIA

Joolz

String Concatenation With Carriage Return
Hi all,
I'm new to this forum and new to VB. I'm trying to concatenate some strings and put the resulting string into an ActiveX textbox component within an Excel spreadsheet. I can do this with regular characters but how to do this with the carriage return?

finalString = "This is sentence one<carriage return>" & "Next string"

How do I represent the carriage return in the above code? I know its ANSI code is "13" but not how to include the "13" into the above code segment.

Thanks.
Lucy

Copyright © 2005-08 www.BigResource.com, All rights reserved