Creating Folder and Saving in that folder

reeliq

New Member
Joined
Jul 22, 2011
Messages
6
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
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Try
Rich (BB code):
ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\nbkt9bl\Desktop\BACHL RCBAP\QA\Daily Files\Sharepoint Files\" & Format(RptDateN, "m-dd") & "-BACHL-RCBAP (Master)" & ".xls" _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,707
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top