Sub 更改格式()
Dim objShell As Object
Set objShell = CreateObject("Wscript.Shell")
Dim msg As String
Dim f, Mywb As String, str$
Dim Sht As Worksheet
Dim i As Long
Dim count As Integer
Application.ScreenUpdating = False
Mywb = ThisWorkbook.Name
f = Dir(ThisWorkbook.Path & "\*.xls") 'F是工作簿名称
Do While f > ""
If f <> Mywb Then
str = str & vbCrLf & f
On Error Resume Next
Workbooks.Open Filename:=ThisWorkbook.Path & "\" & f '打开该工作簿
Workbooks(f).SaveAs Filename:=ThisWorkbook.Path & "\" & f & ".xlsx" '将工作簿另存为xlsx格式的工作簿,该句代码有问题? 这里求帮助
Workbooks(f).Save '原工作簿保存关闭
Workbooks(f).Close
count = count + 1 '计数 执行几次
End If
f = Dir '下一个工作簿名字
Loop
Application.ScreenUpdating = True
objShell.Popup "本次共执行了" & count & "个工作簿,分别为" & str & Chr(10) & "请仔细核对!!!", 0, "温馨提示", vbInformation
Set objShell = Nothing
End Sub
框架已经写完,关键代码不对?求帮助