'----------控件设置
Private Sub CommandButton1_Click()
Dim ws As Worksheet, num As Long
'-----
Set ws = Sheet1
With ws
For num = 2 To .Range("A65536").End(xlUp).Row
Call cmName(.Cells(num, 1) & ".xls", .Cells(num, 2) & ".xls")
Next
End With
Set ws = Nothing
MsgBox "操作完成...", vbInformation
End Sub
'----------自定义函数
Sub cmName(oldName As String, newName As String)
Name oldName As newName
End Sub