Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assumes A1:B3 does not have merged cells.
Private Sub Worksheet_Change(ByVal Target As Range) Dim msg as String If Target.Count 1 Then Exit Sub If Not Intersect(Target, Range("A1:B3")) Is Nothing Then msg = "" Select Case LCase(Target) Case "admin" msg = "You may edit data only" Case "manager" msg = "You have editing data and modify content" Case "co-ordinator" msg = "Please contact extension 1453 for more information" End Select If msg < "" Then MsgBox msg End If End If End Sub Right click on the sheet tab and select view code. Paste in code similar to the above. -- Regards, Tom Ogilvy "Neil Goldwasser" wrote in message ... Hi! I was wondering if it is possible to write a macro so that if any of the words "admin", "manager" or "co-ordinator" are entered into any of the cells A1:B3, then a message box will pop up saying "Your current user status allows editing". It would be great if it would work if any of those three words are put in, but if it can only look out for one particular word, "admin" would be enough. Ideally (and this really would be perfect!) it would be great if the macro could still look at cells A1:B3, but that it would have different messages depending on which key-word is entered. e.g. - If "admin" is entered it would display "You may edit data only" - If "manager" is entered it would display "You have editing data and modify content" - If "co-ordinator" is entered it would display "Please contact extension 1453 for more information" Can anybody think of a way of doing this? (I am a bit of a Visual Basic novice, but can follow instructions!) Many thanks in advance, Neil Goldwasser |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error message needed if incorrect Date Of Birth (DOB) entered | Excel Worksheet Functions | |||
Lookup Entered Value and return message | Excel Worksheet Functions | |||
Create error message if number entered is greater than previous ce | Excel Discussion (Misc queries) | |||
formula to show the message that number already entered | Excel Worksheet Functions | |||
How to give an error message if a cell value entered is larger than permitted | Excel Discussion (Misc queries) |