ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Temporary suspend the validation (https://www.excelbanter.com/excel-programming/385018-temporary-suspend-validation.html)

jimmy[_5_]

Temporary suspend the validation
 
Hi all,

Any method to temporary suspend the validation by clicking a button?

Thanks



Susan

Temporary suspend the validation
 
well, you could code a button to check for validation & then either
delete it or add the specific one you want.........
for instance, i use validation a lot to "lock" cells for my basic-
level-excel users, so i recorded a macro while i did one & then
assigned it to a button:

Sub LockFormulaValidation()
'
' LockFormulaValidation Macro
' Macro recorded 8/25/2006 by Susan
'
With Selection.Validation
.Delete
.Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween, Formula1:="="""""
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "FORMULA CELL"
.InputMessage = ""
.ErrorMessage = "No manual calculation allowed!"
.ShowInput = False
.ShowError = True
End With
End Sub

try using the macro recorder to set up the validation. then record
another one deleting it. then you can put them together in a button.
susan


On Mar 12, 2:19 am, "jimmy" wrote:
Hi all,

Any method to temporary suspend the validation by clicking a button?

Thanks





All times are GMT +1. The time now is 11:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com