LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Validation of 2 rows of cells, only 'X' or 'x' allowed.

Hello,

After roaming through the Search resluts on "Validation" I still have not
found a solution to my question.

I have a worksheet, that will be sent to a list of volunteers, who can mark
theu availability on this sheet by putting a "x" or "x" (a cross) in 2 rows
of cells.
(These rows are weekdays, morning/afternoon/evening)

I ONLY want an "X" (or "x") in these 2 x 21 cells.

I tried this snipet

[snippet]
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$19" Then
Debug.Print "oke"
Application.EnableEvents = False
Target.Text = Trim(Target.Value)
If Target.Text < "X" And Target.Value < "x" Then
MsgBox "Alleen aankruisen met een 'X' of een 'x'!"
Target.ClearContents
Target.Select
End If
Application.EnableEvents = True

End Sub
[/snippet]
on the first cell (D19) but nothing happens, no msgbox, nothing....

Where do I go wrong?

Any suggestions?

YT

Harry

 
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
How do you limit the total allowed for a group of cells? abby Excel Discussion (Misc queries) 1 May 5th 10 03:25 AM
Maximum Allowed Rows xc10miler Excel Discussion (Misc queries) 5 August 15th 08 08:08 PM
Total rows allowed on spreadsheet 2007 version Babyjsmom Excel Worksheet Functions 1 July 25th 08 09:42 PM
How do increase the number of rows allowed in a worksheet? PayPaul Excel Discussion (Misc queries) 4 December 17th 07 06:58 PM
Pivot Table - max rows allowed in data range dmotika Excel Discussion (Misc queries) 2 May 26th 05 05:52 PM


All times are GMT +1. The time now is 12:26 AM.

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"