Writing a macro to save this spreadsheet out on the server and name it.

ghostbroker2

Board Regular
Joined
Feb 13, 2017
Messages
58
Here is the DropBox Link
Dropbox - Production sheet (TEST).xlsm

I need this file to be saved out on our server and be named after the contents of cell C3.K2.M1

The pathway is as follows;
"\\RWCAD\Rewinding Spreadsheets\RW PRODUCTION REPORTS"

The file is currently macro enabled, but once it is saved it does not have to be.

I've written something somewhat similar in the past, but i do not know how to add decimals in between the 3 cell values to automate the naming of the file.

I will submit the macro from before... I'm not positive, but maybe if we can use this one if we get the decimal-naming to work.

Option Explicit

Public Sub macSave()
Dim WB As Workbook
Dim SH As Worksheet
Dim Rng As Range
Dim sFilename As String

Const sSheetName As String = "NEW PRODUCTION"
Const sCell As String = "C3"
Const sPath As String = _
"\\RWCAD\Rewinding Spreadsheets\Rewinding Excel Report"

Set WB = ThisWorkbook
Set SH = WB.Sheets(sSheetName)
Set Rng = SH.Range(sCell)

sFilename = sPath & Rng.Value & ".xlsm"

WB.SaveAs Filename:=sFilename, _
FileFormat:=52
End Sub


Still learning VBA and macros. Thank you for educating a brother.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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