Hi,
How do i write a code in
VB to define names for cells in excel?
The following is the code i use but doesn't work.
worksheets("Data").Names.Add Name:="myF4",
RefersToR1C1:="=Sheet1!R4C4"
worksheets("Data").FormatConditions.Add Type:=xlCellValue,
Operator:=xlGreater, Formula1:="50"
worksheets("Data").FormatConditions(1).Interior.Co lorIndex = 6
worksheets("Data").FormatConditions.Add Type:=xlCellValue,
Operator:=xlLess, Formula1:="50"
worksheets("Data").FormatConditions(2).Interior.Co lorIndex = 42
Thank you for your help.
--
associates
------------------------------------------------------------------------
associates's Profile:
http://www.excelforum.com/member.php...o&userid=35073
View this thread:
http://www.excelforum.com/showthread...hreadid=549325