Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks 4 sending me in the right direction, Edwin! ...
To clarify, I need to provide cell validation if a user doen't use my form for data input, but inserts a new line and starts editing. Came up with this that seems to work (list validation for cells B1:B10) : Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Application.EnableEvents = False If Target.Column = "2" And Target.Row < 10 Then With Range(Target.Address).Validation .Add Type:=xlValidateList, Formula1:=Range("E2") .ErrorTitle = "Ooops" .ErrorMessage = "You can do it Bubba - Try Again" End With End If Application.EnableEvents = True End Sub Many thanks, Tom "Edwin Tam" wrote: Your question is too unclear on what excactly what you want to do. The only thing which came to my mind is the "Worksheet_Change" event of the worksheet. However, my opinion is: it could be very difficult to really "trap an insert row". Difficult to make it efficient and bullet proof. It'll require a continuous checking of the pre-change and post-change layout of the worksheet. It could be less difficult if the structure is highly predictable and restricted. Regards, Edwin Tam http://www.vonixx.com "TRB" wrote: So I can apply validation and checks? TIA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Another 'Copy To The Next Available Row' Question | Excel Discussion (Misc queries) | |||
Permanently link Col A edits, inc 'insert row' in multiple workshe | Excel Worksheet Functions | |||
'select table row' | Excel Discussion (Misc queries) | |||
Trap Right CLick Insert | Excel Programming | |||
How to get the 'current row' from VBA | Excel Programming |