V
Vacuum Sealed
Hi All
Could someone have a look at this code and give me a pointer as to where I
am going wrong and why the code halts on the .Save within the With Statement
please...
It should be saving to E: Drive 1st, then change directory to C: Drive and
do the same, ala, it is not....
Sub save_WB()
Dim E_FileSave As Workbook
Dim E_FilePath As String
Dim E_FileName As String
Dim C_FileSave As Workbook
Dim C_FilePath As String
Dim C_FileName As String
Dim FileExtStr As String
Dim FileFormatNum As Long
Set E_FileSave = ActiveWorkbook
E_FilePath = "E:\Work_Stuff\"
E_FileName = E_FileSave.Name
FileExtStr = ".xls"
With E_FileSave
.SaveAs E_FilePath & E_FileName & FileExtStr,
FileFormat:=FileFormatNum
End With
Set C_FileSave = ActiveWorkbook
T_FilePath = "C:\Other Work_Stuff\"
T_FileName = C_FileSave.Name
FileExtStr = ".xls"
With C_FileSave
.SaveAs C_FilePath & C_FileName & FileExtStr,
FileFormat:=FileFormatNum
End With
End Sub
TIA
Mick.
Could someone have a look at this code and give me a pointer as to where I
am going wrong and why the code halts on the .Save within the With Statement
please...
It should be saving to E: Drive 1st, then change directory to C: Drive and
do the same, ala, it is not....
Sub save_WB()
Dim E_FileSave As Workbook
Dim E_FilePath As String
Dim E_FileName As String
Dim C_FileSave As Workbook
Dim C_FilePath As String
Dim C_FileName As String
Dim FileExtStr As String
Dim FileFormatNum As Long
Set E_FileSave = ActiveWorkbook
E_FilePath = "E:\Work_Stuff\"
E_FileName = E_FileSave.Name
FileExtStr = ".xls"
With E_FileSave
.SaveAs E_FilePath & E_FileName & FileExtStr,
FileFormat:=FileFormatNum
End With
Set C_FileSave = ActiveWorkbook
T_FilePath = "C:\Other Work_Stuff\"
T_FileName = C_FileSave.Name
FileExtStr = ".xls"
With C_FileSave
.SaveAs C_FilePath & C_FileName & FileExtStr,
FileFormat:=FileFormatNum
End With
End Sub
TIA
Mick.