![]() |
File Attributes / Save As New File Name
Having reset a worksheet to zero, how can I force users to
use a new filename, rather than just Save and defaulting to existing name. Can I set Read Only attribute for currently open file or alternatively bring up File Save As and only accept new name entries? Many Thanks Paul |
File Attributes / Save As New File Name
Read only will do the job!
Nikos Y. (nyannaco at in dot gr) -----Original Message----- Having reset a worksheet to zero, how can I force users to use a new filename, rather than just Save and defaulting to existing name. Can I set Read Only attribute for currently open file or alternatively bring up File Save As and only accept new name entries? Many Thanks Paul . |
File Attributes / Save As New File Name
"Paul Moles" wrote in message ... Having reset a worksheet to zero, how can I force users to use a new filename, rather than just Save and defaulting to existing name. Can I set Read Only attribute for currently open file or alternatively bring up File Save As and only accept new name entries? Many Thanks Paul Hi Paul: You can set the starting file to read only just by going into Windows Explorer ... right click on the file name ... properties ... tick read only. Alternatively, you can do it in VBA: SetAttr "C:\MyFile.xls", vbReadOnly BUT you can't do that for a file that is already open! What you can also do is ask the user for the file name (either by inputting it on the spreadsheet or through an input box). You can then check whether the file already exists before saving by using While Dir ("C:\MyChosenFileName") < "" Code to ask user to choose a different file name Wend |
All times are GMT +1. The time now is 12:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com