Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase with Worksheet_Change and Target Address
If a small letter is entered into a specific cell, I need it to be upper case
or to have the code recognize either lower or upper case for the Worksheet_Change to fire. I've tried putting the UCase in, but nothing is working. Here is the code without the UCase in it: I Need L23 to be Upper Case for this to work currently. If Target.Address = "$L$23" Then Set Target = Range("K23") DWSat = Range("K23") BSat = Range("L23") If BSat = "Y" And DWSat = 0 Then MsgBox "You Have Turned On Your Budget. You Must Now Set a Daily Daily Weight!", Buttons:=vbExclamation Target.Select End If End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase with Worksheet_Change and Target Address
If Target.Address = "$L$23" Then DWSat = Range("K23") BSat = Ucase(Range("L23").Value) If BSat = "Y" And DWSat = 0 Then MsgBox "You Have Turned On Your Budget. " & _ "You Must Now Set a Daily Daily Weight!", Buttons:=vbExclamation Range("K23").Select End If End If I would advise against trying to set Target to reference another cell. -- Regards, Tom Ogilvy "David" wrote in message ... If a small letter is entered into a specific cell, I need it to be upper case or to have the code recognize either lower or upper case for the Worksheet_Change to fire. I've tried putting the UCase in, but nothing is working. Here is the code without the UCase in it: I Need L23 to be Upper Case for this to work currently. If Target.Address = "$L$23" Then Set Target = Range("K23") DWSat = Range("K23") BSat = Range("L23") If BSat = "Y" And DWSat = 0 Then MsgBox "You Have Turned On Your Budget. You Must Now Set a Daily Daily Weight!", Buttons:=vbExclamation Target.Select End If End If |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase with Worksheet_Change and Target Address
Tom....my deepest appreciation for all your help these past two weeks on this
project. It has been received extremely well...and it was with your help that I was able to provide such an amazing piece of "ART"! Thank you again so much for your assistance!! David "Tom Ogilvy" wrote: If Target.Address = "$L$23" Then DWSat = Range("K23") BSat = Ucase(Range("L23").Value) If BSat = "Y" And DWSat = 0 Then MsgBox "You Have Turned On Your Budget. " & _ "You Must Now Set a Daily Daily Weight!", Buttons:=vbExclamation Range("K23").Select End If End If I would advise against trying to set Target to reference another cell. -- Regards, Tom Ogilvy "David" wrote in message ... If a small letter is entered into a specific cell, I need it to be upper case or to have the code recognize either lower or upper case for the Worksheet_Change to fire. I've tried putting the UCase in, but nothing is working. Here is the code without the UCase in it: I Need L23 to be Upper Case for this to work currently. If Target.Address = "$L$23" Then Set Target = Range("K23") DWSat = Range("K23") BSat = Range("L23") If BSat = "Y" And DWSat = 0 Then MsgBox "You Have Turned On Your Budget. You Must Now Set a Daily Daily Weight!", Buttons:=vbExclamation Target.Select End If End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using worksheet_change to change value of target cell?? | Excel Programming | |||
Worksheet_change Target Address is Reference Cell | Excel Programming | |||
Worksheet_change Target Address is Reference Cell | Excel Programming | |||
Worksheet_change Target Address is Reference Cell | Excel Programming | |||
How find if target is object in Worksheet_Change (ByVal Target As.. ?) | Excel Programming |