Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Quill,
Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Cells.Count 1 Then Exit Sub If Len(Target.Value) 0 Then Exit Sub Application.EnableEvents = False If Target.Address = "$B$5" Then Target.Value = "Enter Something" If Target.Address = "$B$6" Then Target.Value = "Enter New Code" If Target.Address = "$C$1" Then Target.Value = "Enter Old Code" If Target.Address = "$C$2" Then Target.Value = "Enter Old Code" 'And so on...... ' I hope you can see the logic Application.EnableEvents = True End Sub HTH, Bernie MS Excel MVP " wrote in message ... I have attached below and the result in Cell B5=Enter Something Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Address = "$B$5" Then If Len(Target.Value) = 0 Then Target.Value = "Enter Something" End If End Sub Question: In Cell B6 can I use some kind of formula resulting in "Enter New Code" along with the same formula above. Meaning: Same worksheet: B5=Enter Something B6=Enter New Code Additional: Example of Result Same worksheet: B5=Enter Something B6=Enter New Code C1 to C2=Enter Old Code E1=Help Me. Thanks a bundle. Quill666 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Control Toolbox and Private Sub Worksheet_Change(ByVal Target As R | Excel Discussion (Misc queries) | |||
Private Sub Worksheet_Change(ByVal Target As Excel.Range) | Excel Programming | |||
Private Sub Worksheet_Change(ByVal Target As Excel.Range) | Excel Worksheet Functions | |||
Private Sub Worksheet_Change(ByVal Target As Range) | Excel Programming | |||
Private Sub Worksheet_Change(ByVal Target As Range) | Excel Programming |