View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Runtime error 1004

Sub noprecedents()
On Error GoTo nomo
Selection.DirectPrecedents.Select
nomo:
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"IgorM" wrote in message
...
Hi

When my macro tries to run the line below if the selected cell has no
formulas i get a runtime error 1004 - no cells were found. How to get
around this?

Selection.DirectPrecedents.Select

Kind regards
Igor