![]() |
Validation eradication
The following code is meant to eradicate a cell validation. The problem is I
have to select another cell first then reselect the cell the code was carried out on. Private Sub CommandButton1_Click() With Selection.Validation .Delete ActiveWindow.SmallScroll Down:=1 ActiveWindow.SmallScroll Up:=1 End With With Selection.Select End With End Sub You will see I have tried to get around it by moving down one cell then up again, but this does not work. Thank you if you can be of help. Pat |
Validation eradication
Hi Pat
I am sure somebody in this newsgroup will be able to get this to work without the need to select another cell but in the meantime you could try: Private Sub CommandButton1_Click() With Selection .Validation.Delete .Offset(1, 0).Select .Select End With End Sub Hope this helps Rowan Pat wrote: The following code is meant to eradicate a cell validation. The problem is I have to select another cell first then reselect the cell the code was carried out on. Private Sub CommandButton1_Click() With Selection.Validation .Delete ActiveWindow.SmallScroll Down:=1 ActiveWindow.SmallScroll Up:=1 End With With Selection.Select End With End Sub You will see I have tried to get around it by moving down one cell then up again, but this does not work. Thank you if you can be of help. Pat |
All times are GMT +1. The time now is 08:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com