hi
this is the part of code i am stuck at i think i made amistake trying to save at once into 2 folders
this is the part of code i am stuck at i think i made amistake trying to save at once into 2 folders
Rich (BB code):
With ActiveWorkbook.Worksheets("IDGS Billing")
FileName = "IDGS" & " " & Format(DateFrom, "m.d.yyyy") & " - " & Format(DateTo, "m.d.yyyy") & " " & MissingDiagnosisIDGS & " - " & NextID & " - " & IDGSTotal
Set tbl = .ListObjects(1)
tbl.Range.Copy
End With
Set wb = Workbooks.Add
wb.Activate
wb.Sheets(1).Range("A1").PasteSpecial xlPasteAll
'wb.Sheets(1).Range("A1").PasteSpecial xlPasteValuesAndNumberFormats
ActiveWorkbook.Queries("IDGS Billing").Delete
Selection.Columns.AutoFit
FullFileName = FileName & " " & "(" & FileDateTime & ")" & ".xlsx"
'Save and Close New WB
wb.SaveAs SaveFolder & "\" & FullFileName, xlOpenXMLWorkbook
wb.Close SaveChanges:=False
DoEvents
wb.SaveAs SaveFolder2 & "\" & FullFileName, xlOpenXMLWorkbook this part fails what do i do to save in 2 locations?
wb.Close SaveChanges:=False
DoEvents
'Back to Main WB
ThisWorkbook.Activate