If IsArray(myFileNames) = False Then
'user hit cancel
Exit Sub
End If
For fCtr = LBound(myFileNames) To UBound(myFileNames)
Set wks = Workbooks.Open(Filename:=myFileNames(fCtr)).Worksheets(1)
wks.Name = "Sheet1"
newFileName _
= Left(myFileNames(fCtr), Len(myFileNames(fCtr)) - 4) & ".xls"
With wks.Parent
Application.DisplayAlerts = False
.SaveAs Filename:=newFileName, FileFormat:=xlWorkbookNormal
Application.DisplayAlerts = True
.Close savechanges:=False
End With
Next fCtr
End Sub
Just click & ctrl-click on as many as you want to convert (or click the top one
and shift-click the bottom one to select all in between).
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.