Auto workbook create

Rahulwork

Active Member
Joined
Jun 9, 2013
Messages
284
Hi Everyone,

i have a code which create workbook into the specific folder. however i want to create multiple folder by the date name:

for example

code is

ActiveWorkbook.SaveCopyAs "D:\TEMP\XXXX.XLS"

so i want, this XXXX file name should depend on A1. where we would have date. so i can create multiple copy of current work with the date bifurcation


 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
How about
Code:
"D:\TEMP\" & Format(Range("A1").Value, "dd-mm-yyyy") & ".XLS"
 
Upvote 0
thanks i would check and seems it would work too

by the way fluff, is there any chance if i can add a code in above that

i want to hide a specific sheet in copy one. like this button would be on sheet name "East" so when i create copy that sheet should be hidden. :( possible?
 
Upvote 0
Is the code in the sheet module of sheet "East"?
 
Upvote 0
In that case I don't understand what you are asking.
 
Upvote 0
I have a button to create a new workbook. the one which i asked initially.

Under the new workbook there is a sheet by the name of East. I want that sheet should be hidden
 
Upvote 0
Do you always want to hide the "East"?
 
Upvote 0
In that case add this line, before the saveas line
Code:
Sheets("East").Visible = xlSheetHidden
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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