ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Change the name of an auto save (https://www.excelbanter.com/excel-worksheet-functions/250363-change-name-auto-save.html)

DaveDuf

Change the name of an auto save
 
I am trying to write a macro that will save the file to a specific cell
reference. The reference is a specific name that is automatically generated
by another macro function.
Any suggestions on how I could do this?

Cheers

ryguy7272

Change the name of an auto save
 
IS thsi what you want?

Sub SaveMe()
sFilename = Format(Worksheets("Sheet1").Range("A1").Value)
ans = MsgBox("Save file as " & sFilename)
If ans = vbOK Then
ActiveWorkbook.SaveAs Filename:=sFilename
End If
End Sub

HTH,
Ryan--

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"DaveDuf" wrote:

I am trying to write a macro that will save the file to a specific cell
reference. The reference is a specific name that is automatically generated
by another macro function.
Any suggestions on how I could do this?

Cheers



All times are GMT +1. The time now is 04:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com