Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Save as code
Hi there guys,
is there a code to stop a user to save as if not all fields are filled in? thanks for your help alex |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Save as code
On Jan 2, 7:06 am, wrote:
Hi there guys, is there a code to stop a user to save as if not all fields are filled in? thanks for your help alex You could use a boolean value to specify whether all the fields are filled in. And then only save workbook when the value is true, false to cancel. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Not mbAllFilled Then 'mbAllFilled is used to specify whether all the fields are filled in. Cancel = True MsgBox "Please fill all of fields before you save it!" End If End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Save as code
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = SaveAsUI End Sub The above Is the basic "to Cancel any SaveAs attempt" - maybe add as If then statement to perform the Cancel = SaveAsUI line... HTH, Jim " wrote: Hi there guys, is there a code to stop a user to save as if not all fields are filled in? thanks for your help alex |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Save as code
The replies to your other thread include a line like:
Cancel = True That line stops the Save. ps. It's better to stick in the same thread when you have followup questions. wrote: Hi there guys, is there a code to stop a user to save as if not all fields are filled in? thanks for your help alex -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: | Excel Programming | |||
Stop asking to save changes | Excel Discussion (Misc queries) | |||
Stop Save As prompt | Excel Programming | |||
Using ExitSub to stop a Save | Excel Programming | |||
VBA how can I stop a Save | Excel Programming |