Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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.



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default 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.



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met JMay Excel Discussion (Misc queries) 2 June 17th 07 04:37 PM
Need code to save file to new folder, erase from old folder Ron M. Excel Discussion (Misc queries) 1 February 24th 06 06:02 PM
Prevent user from saving workbook keithl816 Excel Discussion (Misc queries) 3 January 15th 06 10:24 PM
Saving file to a specific folder richkim2000 Excel Discussion (Misc queries) 1 January 25th 05 11:11 PM
prevent user from saving excel file to a folder susie Excel Programming 2 July 24th 03 09:12 PM


All times are GMT +1. The time now is 09:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"