Private Sub CommandButton2_Click() '处理文件名------------------------------2
Columns("A:A").Select
Selection.Copy
Range("B1").Select
ActiveSheet.Paste
Columns("B:B").Select
Selection.Replace What:="走访基本信息表-", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:=".doc*", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Set regx = CreateObject("vbscript.regexp")
With regx
.Global = True
.Pattern = "\d+"
For Each Rng In [B: B].SpecialCells(xlCellTypeConstants, 23)
Rng.Offset(0, 0) = .Replace(Rng, "")
'Cells(Rng.Row, 14) = .Replace(Rng, "")
Next
End With
Cells(1, 2) = "户主名"
Cells(1, 3) = "特困金额"
End Sub