|
ん、"さ"行が抜けてましたね。失礼。
Sub Sheet名で保存()
Dim Ary As Variant
Dim i As Integer
Dim Fname As String
Const Fol As String = "D:\見込み\集計DB\国内\DB\"
Ary = Array("あ", "か", "さ", "た", "な", "は")
Application.ScreenUpdating = False
On Error Resume Next
For i = 0 To 5
Fname = "Sheet" & Ary(i)
If Dir(Fol & Fname) <> "" Then Kill Fol & Fname
Sheets(Fname).Copy
ActiveWorkbook.Close True, Fol & Fname
If Err.Number <> 0 Then Err.Clear
Next i
On Error GoTo 0
Application.ScreenUpdating = True
MsgBox "ファイル作成を終了しました", 64
End Sub
で、やってみて下さい。
|
|