Home > Software engineering >  Vb how to carriage return after take out a bunch of English???????
Vb how to carriage return after take out a bunch of English???????

Time:10-29

How to use vb will automatically become a chart of the segmented English

CodePudding user response:

S="abcd... "

S=replace (s, VBCRLF, "")

CodePudding user response:

S=replace (s, VBCRLF, "") 'use Spaces instead of carriage returns will be suitable

CodePudding user response:

Tried it on as if not goozyet can bother to write a realized the complete code

CodePudding user response:

First this text is selected, and then execute the code,
 Sub rep () 
Dim sText As String
SText=Selection. The Text
SText=Replace (sText vbCr, "")
Selection. The Text=sText
End Sub

CodePudding user response:

 strLine=Replace (strLine vbTab, "") 'TAB character to Replace into" "
StrLine=Replace (strLine, CRH (0), "") 'will line terminators replaced with" "
StrLine=Replace (strLine, vbCrLf, "") 'will return characters replaced with" "

CodePudding user response:

 Sub rep () 
Dim s As String
S="... "' your text more
S=Replace (s, vbCr, "")
S=Replace (s, vbCrlf, "")
The print s
End Sub

CodePudding user response:

Using a word to replace line ah, find replacement: find the content as follows: ^ p, alternative content is: please half Angle space
Then point all replacement, ok

CodePudding user response:

To save to a notepad, C: \ 1. TXT
 
'┏ 〓 〓 〓 〓 〓 〓 〓 〓 〓 OpenFile, start 〓 〓 〓 〓 〓 〓 〓 〓 〓 ┓
'[abstract] :
'opens the file
The Function OpenFile (FileName, Optional ErrInfo As String) As String
'[19] mycode_id: edittime: 2012/9/5 19:48:31
On Error GoTo Err1
Dim the Fs, TextFile
Set the Fs=CreateObject (" Scripting. FileSystemObject ")
The Set TextFile=Fs. OpenTextFile (FileName)
OpenFile=TextFile.ReadAll ' 读取整个文件的信息
The Exit Function
Err1:
ErrInfo=Err. The Description
End the Function
'┗ 〓 〓 〓 〓 〓 〓 〓 〓 〓 OpenFile, end 〓 〓 〓 〓 〓 〓 〓 〓 〓 ┛
'┏ 〓 〓 〓 〓 〓 〓 〓 〓 〓 SaveFile, start 〓 〓 〓 〓 〓 〓 〓 〓 〓 ┓
'[detailed interface] :
'save sometimes garbled or change
'[abstract] :
'save character information into a text file, save data
The Function SaveFile (zname zbody, optional MSG as Boolean)
'[mycode_id: 177], edittime: 2011/9/9 15:29:57
On Error GoTo err
Dim myfile, fso
The Set of fso=CreateObject (" Scripting. FileSystemObject ")
The Set myfile=fso. CreateTextFile (zname, True)
Myfile. Write zbody
The Set myfile=Nothing
The Set of fso=Nothing
If the MSG Then MsgBox "successfully saved!" & VbCrLf & amp; Zname
The Exit Function
Err:
'MsgBox err. The Description
End the Function
'┗ 〓 〓 〓 〓 〓 〓 〓 〓 〓 SaveFile, end 〓 〓 〓 〓 〓 〓 〓 〓 〓 ┛

SUB TEST
DIM S
S=OPENFILE (" C: \ 1. TXT ")
S=REPLACE (S, VBCRLF, "")
SAVEFILE (" C: \ 1. TXT ", S)
END SUB

CodePudding user response:


Data sources in this period of English? In a file? A text box? Or in a picture?

CodePudding user response:

 Sub rep () 
Dim s As String
S="... "' your text more
S=Replace (s, vbCr, "")
S=Replace (s, VBLF, "")
The debug. Print "s=[" + s +"] "
End Sub

CodePudding user response:

Please let vba in excel in article 2000 of data in a sheet to the oracle bulk insert data have what good way? Cycle is too slow to feel, you have what good method? Thank you,, sorry, didn't got the hair don't post, borrow to ask!

CodePudding user response:

Haven't focused on VB, there are still many years ago old comrade-in-arms has been struggle here ah, admire!
  •  Tags:  
  • VBA
  • Related