I'm very new to VBA coding and I'm having trouble accomplishing this task.
I have a code written to create a new folder and code written to save in an existing file but I can not figure out how to get this file saved in the new folder that is being created by the same Macro.
Oh and I'm using information in the file to name the folder as well as the file.
Anyone able to assist with this would be greatly appreciated.
If Len(Dir("C:\Documents and Settings\nbkt9bl\Desktop\QA\Daily Files\Sharepoint Files\" & Format(RptDateN, "m-dd"), vbDirectory)) = 0 Then
MkDir "C:\Documents and Settings\nbkt9bl\Desktop\QA\Daily Files\Sharepoint Files\" & Format(RptDateN, "m-dd")
End If
ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\nbkt9bl\Desktop\BACHL RCBAP\QA\Daily Files\Sharepoint Files\" & Format(RptDateN, "MM-DD") & "-BACHL-RCBAP (Master)" & ".xls" _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
I have a code written to create a new folder and code written to save in an existing file but I can not figure out how to get this file saved in the new folder that is being created by the same Macro.
Oh and I'm using information in the file to name the folder as well as the file.
Anyone able to assist with this would be greatly appreciated.
If Len(Dir("C:\Documents and Settings\nbkt9bl\Desktop\QA\Daily Files\Sharepoint Files\" & Format(RptDateN, "m-dd"), vbDirectory)) = 0 Then
MkDir "C:\Documents and Settings\nbkt9bl\Desktop\QA\Daily Files\Sharepoint Files\" & Format(RptDateN, "m-dd")
End If
ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\nbkt9bl\Desktop\BACHL RCBAP\QA\Daily Files\Sharepoint Files\" & Format(RptDateN, "MM-DD") & "-BACHL-RCBAP (Master)" & ".xls" _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False