Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I wrote this complicated spreadsheet with macros with 5 sheets. I am not good at macro writing, but the wizard helps. On open I unprotect the fields the user has to fill in. The user manages periodically to mess up my formulas, because he keeps saving my original file with data. I don't know how he does it, but he does. The spreadsheet is called Joist I now searched and found that I can password protect the spreadsheet and make it open in read only mode. It works fine, the user can still enter data upon trying to save the spreadsheet excel prompts for file name as: copy of_Joist. Is it possible to write some code to make the filename a cell from the spreadsheet, in this case Input!C2 has the pour number, for example 2458, I would like to save the spreadsheet as Joist2458. -- annep ------------------------------------------------------------------------ annep's Profile: http://www.excelforum.com/member.php...o&userid=18851 View this thread: http://www.excelforum.com/showthread...hreadid=494480 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
You could try this code Sub Macro1() Dim fileext As String Range("C2").Select fileext = ActiveCell ActiveWorkbook.SaveAs Filename:= _ "C:\Joist" & fileext & ".xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False End Sub "annep" wrote: I wrote this complicated spreadsheet with macros with 5 sheets. I am not good at macro writing, but the wizard helps. On open I unprotect the fields the user has to fill in. The user manages periodically to mess up my formulas, because he keeps saving my original file with data. I don't know how he does it, but he does. The spreadsheet is called Joist I now searched and found that I can password protect the spreadsheet and make it open in read only mode. It works fine, the user can still enter data upon trying to save the spreadsheet excel prompts for file name as: copy of_Joist. Is it possible to write some code to make the filename a cell from the spreadsheet, in this case Input!C2 has the pour number, for example 2458, I would like to save the spreadsheet as Joist2458. -- annep ------------------------------------------------------------------------ annep's Profile: http://www.excelforum.com/member.php...o&userid=18851 View this thread: http://www.excelforum.com/showthread...hreadid=494480 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to save file as different filename | Excel Worksheet Functions | |||
Auto save file copy with unique filename | Excel Worksheet Functions | |||
Save filename as new file name | Excel Programming | |||
Save file, refer filename to cell and change directory | Excel Programming | |||
Save excel file with filename = cell text | Excel Programming |