Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pat Pat is offline
external usenet poster
 
Posts: 122
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
Validation (Drop down list vs simple text length validation) Bob Phillips[_6_] Excel Programming 2 April 27th 04 07:47 PM
Validation (Drop down list vs simple text length validation) Jason Morin[_2_] Excel Programming 1 April 27th 04 04:56 PM
Validation (Drop down list vs simple text length validation) Pete McCosh Excel Programming 0 April 27th 04 03:49 PM


All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"