Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Input Monitoring
I am looking to only allow an "X" be entered in Columns H9:H400,I9:I400 and J9:J400. If anything else is inserted in any of these cells a Message box will pop up stating only an "X" can be entered in this cell. Any Ideas? Thanks in advance!:) -- parteegolfer ------------------------------------------------------------------------ parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951 View this thread: http://www.excelforum.com/showthread...hreadid=521816 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Input Monitoring
You can use the Worksheet_Change event procedure. In the VBA editor, view
the project explorer and double-click on the worksheet you are using. Then in the code pane type this code: Private Sub Worksheet_Change(ByVal Target As Range) Dim TestCell As Range, Invalid As Boolean If Not (Intersect(Target, Range("H9:J400")) Is Nothing) Then For Each TestCell In Target.Cells Invalid = Invalid Or TestCell.Value < "X" Next TestCell End If If Invalid Then MsgBox "You must enter 'X' here" Application.EnableEvents = False Application.Undo Application.EnableEvents = True End If End Sub -- - K Dales "parteegolfer" wrote: I am looking to only allow an "X" be entered in Columns H9:H400,I9:I400 and J9:J400. If anything else is inserted in any of these cells a Message box will pop up stating only an "X" can be entered in this cell. Any Ideas? Thanks in advance!:) -- parteegolfer ------------------------------------------------------------------------ parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951 View this thread: http://www.excelforum.com/showthread...hreadid=521816 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Input Monitoring
Tried this code and nothing happened when I entered something other than an "x" in any of the cells to be monitored. Any suggestions? -- parteegolfer ------------------------------------------------------------------------ parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951 View this thread: http://www.excelforum.com/showthread...hreadid=521816 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Input Monitoring
Nevermid. It was somethig I had done. Thanks for the response and help! -- parteegolfer ------------------------------------------------------------------------ parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951 View this thread: http://www.excelforum.com/showthread...hreadid=521816 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to input pictures automatically based on cell input? | Excel Worksheet Functions | |||
monitoring links | Excel Discussion (Misc queries) | |||
monitoring use | Excel Discussion (Misc queries) | |||
Have user input converted to uppercase in same cell as input? | New Users to Excel | |||
Monitoring Changes | Excel Programming |