Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prevent Saving command if data is not validad
Im trying to force the users to enter the correct format of the data needed,
ive found a way to prevent the save command, but i have not been able to validate first. Id apreciate some help on this subject. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prevent Saving command if data is not validad
It will take a little more information that you have provided to make any
useful suggestions. "HugoLTote" wrote: Im trying to force the users to enter the correct format of the data needed, ive found a way to prevent the save command, but i have not been able to validate first. Id apreciate some help on this subject. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prevent Saving command if data is not validad
There is a event named BeforeSave in the Thisworkbook module that you can use
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Trim(Sheets("sheet1").Range("A1").Value) = "" Then Cancel = True End Sub This example check if there is somethin in cell A1 of "Sheet1" -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "HugoLTote" wrote in message ... Im trying to force the users to enter the correct format of the data needed, ive found a way to prevent the save command, but i have not been able to validate first. Id apreciate some help on this subject. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Prevent saving and allow only through Macro | Excel Discussion (Misc queries) | |||
Prevent Saving | Excel Discussion (Misc queries) | |||
Prevent Saving From Web | Excel Programming | |||
prevent saving a worksheet | Excel Discussion (Misc queries) | |||
Macro to prevent saving | Excel Programming |