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: 11,272
Default Excel cell Validation

Private Sub Worksheet_Change(ByVal Target As Range)
Debug.Print "RUNNING" Application.EnableEvents = False
Select Case Target.Value
Case 1
Target.Value = "Read Only"
Case 2
Target.Value = "Assessor"
Case 3
Target.Value = "Reviewer"
End Select
Application.EnableEvents = True
End Sub


???

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"excelnaive" wrote in message
...
In a event macro I have to specify the column I want to change but is it

possible to do it generically I mean not tying it to one column or row and
instead put the functionality in to work for any column/row and let the user
choose which column he wants that format in?Is it possible to do that?
This is what I currently have....So how I change it so that I need not

specify target.column and make it generic......

Private Sub Worksheet_Change(ByVal Target As Range)
Debug.Print "RUNNING"
If Target.Column = 5 Then
Application.EnableEvents = False
Select Case Target.Value
Case 1
Target.Value = "Read Only"
Case 2
Target.Value = "Assessor"
Case 3
Target.Value = "Reviewer"
End Select
Application.EnableEvents = True
End If

End Sub



 
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
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
Cell Validation on Excel Gord Dibben Excel Discussion (Misc queries) 0 March 20th 08 11:10 PM
Cell Validation on Excel Per Jessen Excel Discussion (Misc queries) 0 March 20th 08 08:17 PM
Cell Validation on Excel Bob Phillips Excel Discussion (Misc queries) 0 March 20th 08 08:09 PM
excel validation, enter particular score in only one cell of a ran H.A. from London Excel Worksheet Functions 1 July 27th 05 12:08 PM


All times are GMT +1. The time now is 08:18 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"