View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
(PeteCresswell) (PeteCresswell) is offline
external usenet poster
 
Posts: 139
Default Adding Validation When Source Validates To Error?

Per Tom Ogilvy:
myWS.Application.DisplayAlerts = False


Seems to have the desired effect if/when I jump over to the
worksheet and manually apply Formula1:="=INDIRECT(RC[-1])"

But the code still traps out with a 1004 on line 2474.
viz:
==================================================
2470 Set myRange = Range(.Cells(1, 2), .Cells(6, 2))
2471 mySS.Application.DisplayAlerts = False 'BC this box's
validation validates to an error since it is intially blank
2472 With myRange.Validation
2473 .Delete
2474 .Add Type:=xlValidateList,
AlertStyle:=xlValidAlertStop, Operator:=xlBetween,
Formula1:="=INDIRECT(RC[-1])"
2475 .IgnoreBlank = True
2476 .InCellDropdown = True
2477 End With
2479 mySS.Application.DisplayAlerts = False
2499 End With

==================================================

Maybe I'm jumping to cause with the "..evaluates to an error"
explaination and doing something else that's
provoking the 1004?
--
PeteCresswell