问题 Sub Merge() Dim File As String Dim AllFiles(), Filename As Variant Dim count, test, StartRow, LastRow, LastColumn As Long Dim LastCell As Variant test = 0 ChDir "C:\" 'Insert suitable directory for your computer ex:ChDir "C:\Users\Jerry Hou\" if file of interest is in "Jerry Hou" Folder ReDim AllFiles(1) Do Application.EnableCancelKey = xlDisabled File = Application.GetOpenFilename("XML Files (*.xml),*.xml", 1, "Select File to be Merged") 'Needs to select in Order to merge files Application