Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi everybody,
How can we intrupt Save and Save as in Excel ? I want to write my own code instead of svaing a document when user clciks on save -- Best regards, Edward |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You could add some Workbook_BeforeSave code to the workbook. I can't seem
to find a good reference now, but you should be able to find something by Googling on it. Make sure you put this in the ThisWorkbook module. -- HTH, Barb Reinhardt "Edward" wrote: Hi everybody, How can we intrupt Save and Save as in Excel ? I want to write my own code instead of svaing a document when user clciks on save -- Best regards, Edward |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Barb, Basically my goal is to use the code to let the user to sort a
protected worksheet via vba ( I know have the code ) but the problem is user can save the sorted workbook which im trying to avoid. I thought if I can intrupt the save and save as then I can open a inputbox and if user gives a correct password save the workbook otherwise exit the application without saving . It seems Workbook_beforeSave is not working and gives the opetion of savig. do you know that this idea is even possible? -- Best regards, Edward "Barb Reinhardt" wrote: You could add some Workbook_BeforeSave code to the workbook. I can't seem to find a good reference now, but you should be able to find something by Googling on it. Make sure you put this in the ThisWorkbook module. -- HTH, Barb Reinhardt "Edward" wrote: Hi everybody, How can we intrupt Save and Save as in Excel ? I want to write my own code instead of svaing a document when user clciks on save -- Best regards, Edward |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can check for whatever you want to check in the Workbook_BeforeSave event
(which MUST be in the Thisworkbook code) and if it's not to be saved, simply set Cancel = True Application.Quit (or Thisworkbook.Close False) "Edward" wrote: Thanks Barb, Basically my goal is to use the code to let the user to sort a protected worksheet via vba ( I know have the code ) but the problem is user can save the sorted workbook which im trying to avoid. I thought if I can intrupt the save and save as then I can open a inputbox and if user gives a correct password save the workbook otherwise exit the application without saving . It seems Workbook_beforeSave is not working and gives the opetion of savig. do you know that this idea is even possible? -- Best regards, Edward "Barb Reinhardt" wrote: You could add some Workbook_BeforeSave code to the workbook. I can't seem to find a good reference now, but you should be able to find something by Googling on it. Make sure you put this in the ThisWorkbook module. -- HTH, Barb Reinhardt "Edward" wrote: Hi everybody, How can we intrupt Save and Save as in Excel ? I want to write my own code instead of svaing a document when user clciks on save -- Best regards, Edward |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
SAVE and SAVE AS options disappeared from the drop down FILE menu | Excel Discussion (Misc queries) | |||
Save As and save current numbers not the actual formulas and links | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Save Excel file - prompts to save - no Volitile functions used | Excel Worksheet Functions |