是提取?還是替換(因為替換隻需要查詢就行了)?
是VB6.0嗎
用Replete函式
//...............
Dim A As String
Dim B As String
Dim C As String
Private Sub Form_Load()
Text1.Text = "比如向文字框textbox中貼上“第40號抽屜 班組 1 經費資料夾:把三月支出複製”,如何實現提取“40”“經費”“三月支出”分別替換word文件中的“A”“B”“C”,其他字元相對固定。"
A = "40"
B = "經費"
C = "三月支出"
End Sub
Private Sub Command1_Click()
Dim s
s = Replace(Text1.Text, A, "A")
s = Replace(s, B, "B")
s = Replace(s, C, "B")
Text2.Text = s
//.............
張志晨
是提取?還是替換(因為替換隻需要查詢就行了)?
是VB6.0嗎
用Replete函式
//...............
Dim A As String
Dim B As String
Dim C As String
Private Sub Form_Load()
Text1.Text = "比如向文字框textbox中貼上“第40號抽屜 班組 1 經費資料夾:把三月支出複製”,如何實現提取“40”“經費”“三月支出”分別替換word文件中的“A”“B”“C”,其他字元相對固定。"
A = "40"
B = "經費"
C = "三月支出"
End Sub
Private Sub Command1_Click()
Dim s
s = Replace(Text1.Text, A, "A")
s = Replace(s, B, "B")
s = Replace(s, C, "B")
Text2.Text = s
End Sub
//.............
張志晨