![]() |
prevent user from saving file to a folder but allow my code to save from behind.
I know I can set up the folder as readonly. However I can
not set it up because I have a function button should be able to allow use to click on it and save the file to the Is there anyway to allow my code running to save the file to U:\myfolder but disallow the user using File- Save as function to save it to U:\myfolder? Thank you. |
prevent user from saving file to a folder but allow my code to save from behind.
Susie,
Your posts to the same questioned are getting fractured. Try to keep it all together by using the Reply Group instead of creating a New Post. I am lost as to what you have read and what you are asking. thanks steve "susie" wrote in message ... I know I can set up the folder as readonly. However I can not set it up because I have a function button should be able to allow use to click on it and save the file to the Is there anyway to allow my code running to save the file to U:\myfolder but disallow the user using File- Save as function to save it to U:\myfolder? Thank you. |
prevent user from saving file to a folder but allow my code to save from behind.
Let me restate my issue as follows:
I create a button in excel called save. The code behind the save button is to save the file as MyFile to U:\corporate. I want the user to save the file to U:\corporate by press my save button only. They will not be allowed to use File menu save as button to save the file to U:\corporate. How can I turn of the Save AS function from File menu for U:\corporate while in the meantime the user is allow the save the change they make on the worksheet but not save it as a new file name to U:\corporate. Thank you. -----Original Message----- Susie, Your posts to the same questioned are getting fractured. Try to keep it all together by using the Reply Group instead of creating a New Post. I am lost as to what you have read and what you are asking. thanks steve "susie" wrote in message ... I know I can set up the folder as readonly. However I can not set it up because I have a function button should be able to allow use to click on it and save the file to the Is there anyway to allow my code running to save the file to U:\myfolder but disallow the user using File- Save as function to save it to U:\myfolder? Thank you. . |
prevent user from saving file to a folder but allow my code to save from behind.
Hi Susie,
In the "thisworkbook" module enable the before save event. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 'call your button click sub here SaveAsUI =false Cancel=true End Sub From VBA help: BeforeSave Event Occurs before the workbook is saved. Syntax Private Sub Workbook_BeforeSave(ByVal SaveAsUi As Boolean, Cancel As Boolean) SaveAsUi True if the Save As dialog box will be displayed. Cancel False when the event occurs. If the event procedure sets this argument to True, the workbook isn't saved when the procedure is finished. -- John johnf202 at hotmail dot com "susie" wrote in message ... Let me restate my issue as follows: I create a button in excel called save. The code behind the save button is to save the file as MyFile to U:\corporate. I want the user to save the file to U:\corporate by press my save button only. They will not be allowed to use File menu save as button to save the file to U:\corporate. How can I turn of the Save AS function from File menu for U:\corporate while in the meantime the user is allow the save the change they make on the worksheet but not save it as a new file name to U:\corporate. Thank you. -----Original Message----- Susie, Your posts to the same questioned are getting fractured. Try to keep it all together by using the Reply Group instead of creating a New Post. I am lost as to what you have read and what you are asking. thanks steve "susie" wrote in message ... I know I can set up the folder as readonly. However I can not set it up because I have a function button should be able to allow use to click on it and save the file to the Is there anyway to allow my code running to save the file to U:\myfolder but disallow the user using File- Save as function to save it to U:\myfolder? Thank you. . |
All times are GMT +1. The time now is 03:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com