LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default trying to find #REF! in a formula to replace with a sheet name


Hi have the following piece of code


Sub test()
For Each ws In Worksheets

Set e = .Find(what:="#REF!", LookIn:=xlFormulas)
If Not e Is Nothing Then
firstAddress = e.Address
Do
e.Replace what:="#REF!", Replacement:="'Case-by-cas
mgmt'!", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
'ActiveCell.Offset(0, 2).Value = "Received"
'ActiveCell.Offset(0, 18).Value = e.Value
Set e = .FindNext(e)
Loop While Not e Is Nothing And e.Address < firstAddress
End If

Next
End Sub


when i run this it breaks at the set e = .find part and highlights th
.find the error message is Compile Error: Invalid or unqualifie
reference.

any ideas

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=55650

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and Replace Sheet names FARAZ QURESHI Excel Discussion (Misc queries) 2 February 23rd 09 01:40 AM
How to find and Replace hyperlink in hold sheet? Wiparat Excel Discussion (Misc queries) 1 August 5th 07 11:40 AM
Find Replace Formula shakey1181 Excel Discussion (Misc queries) 1 October 11th 06 02:15 PM
Find and REPLACE within a selection, or column- not entire sheet/. smithers2002 Excel Worksheet Functions 4 April 21st 05 04:45 PM
Find and Replace code in Sheet modules Jon Excel Programming 10 March 29th 05 10:15 PM


All times are GMT +1. The time now is 09:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"