Make save as when sheet name is based on cell value.

Harshil Mehta

Board Regular
Joined
May 14, 2020
Messages
85
Office Version
  1. 2013
Platform
  1. Windows
I have total 6 sheets in my excel workbook from which I want to make a save as of first 5 sheets whose sheet names are based on cell value of sheet(6) E17,F17,G17,H17.I17 [Sheet Name is DASHBOARD]. So if the value in the cell changes the names of the sheets also changes. Please find below the code and would be thankful if anyone could help me.

VBA Code:
Sub Make_SaveAs()

Worksheets(Array(Sheets(1), Sheets(2), Sheets(3), Sheets(4), Sheets(5))).Copy
With ActiveWorkbook
.SaveAs Filename:=Environ("USERPROFILE") & "\Desktop\" & Format(Now(), "YYYYMMDD HHMM") & " " & ThisWorkbook.Sheets(3).Range("C2") & " Design Format.xlsx", FileFormat:=xlOpenXMLWorkbook
.Close SaveChanges:=False
End With



MsgBox "File Saved on Deskstop"

End Sub
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,213,485
Messages
6,113,931
Members
448,533
Latest member
thietbibeboiwasaco

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