Hi!
Im using excel 2003. I do NOT have acess to the rich textbox ;(, and I can't add it to our system because of security measures.
So I use a textbox to get save data to textfiles, works nice!
The data in the textbox often contains multiple rows.
Example:
Hi! We are informing you of XXXXXXX.
In order to gain that bonus you will need to.
- DO
- DO
As you can see there are many lines that are empty.
So my question is.. How do I make the program add a "vbcrlf", when it sees an empty row..? I use the textbox to save templates, that I later send over to word..
I use this code to read everything into my textbox.
Im using excel 2003. I do NOT have acess to the rich textbox ;(, and I can't add it to our system because of security measures.
So I use a textbox to get save data to textfiles, works nice!
The data in the textbox often contains multiple rows.
Example:
Hi! We are informing you of XXXXXXX.
In order to gain that bonus you will need to.
- DO
- DO
As you can see there are many lines that are empty.
So my question is.. How do I make the program add a "vbcrlf", when it sees an empty row..? I use the textbox to save templates, that I later send over to word..
I use this code to read everything into my textbox.
Code:
Dim fpath As String
fpath = Workbooks(1).Path & "\handläggningsstöd\mallar\" & sokvag
If FileOrDirExists(fpath) Then
Dim oFSO As New FileSystemObject
Dim oFS
Set oFS = oFSO.OpenTextFile(fpath)
Do Until oFS.AtEndOfStream
*******First i did this*** Works but i dont get any empty lines
Stext = Stext & oFS.ReadLine
Loop
****then i tried this**** This method does not give me any result..?
If oFS.ReadLine = "" Then
Stext = Stext & vbCrLf
Else
Stext = Stext & oFS.ReadLine
End If