Thanks, works perfectly.
Now what if I wanted to copy two seperate sheets to two different folders? Would i just replicate the code but insert
Sheets("Sheet2").Select
and also change
FP = "C:\Test\" so it now reads FP="C:\Saved\"
Thanks, works perfectly.
Now what if I wanted to copy two seperate sheets to two different folders? Would i just replicate the code but insert
Sheets("Sheet2").Select
and also change
FP = "C:\Test\" so it now reads FP="C:\Saved\"
Actually, think I have it sorted.
![]()
Sub twosheetsave() Dim FP As String, dt As String, wbNam As String FP = "C:\Test\" wbNam = Range("d1").Value dt = Format(CStr(Now), "_hhmm_dd_mm_yyyy") ThisWorkbook.Sheets(3).Copy With ActiveWorkbook .SaveAs Filename:=FP & wbNam & dt & ".xls" End With FP = "C:\Saved\" wbNam = Range("j1").Value dt = Format(CStr(Now), "_hhmm_dd_mm_yyyy") ThisWorkbook.Sheets(2).Copy With ActiveWorkbook .SaveAs Filename:=FP & wbNam & dt & ".xls" .Close True End With End Sub
Or is there a more efficient way to do this?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks