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: 468
Default a Disaster in the Making - R/T error 1004

I've been trying to debug the below code for better than 3 hours, without
success.
Can someone help me?

Sub NewMatchStuff()
Set SRng = Worksheets("TheHdr").Range("D3", Range("D" & Rows.Count).End(xlUp))
Set DRng = Worksheets("Hdr formula").Range("A1:T1")
i = 1
With DRng
Do
Set g = .Find(SRng(i))
If Not g Is Nothing Then
faddress = g.Address
g.Offset(1).Value = SRng(i).Offset(0, -2).Value
End If
i = i + 1
Loop Until Not g Is Nothing
Do
Set g = Nothing 'Need to reset g to Nothing
Set g = .FindNext(SRng(i)) '*** R/T 1004 Here
i = i + 1
Loop While Not g Is Nothing And g.Address < faddress
End With
End Sub
 
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
run time error 1004 general odbc error excel 2003 vba Mentos Excel Programming 5 January 24th 11 02:56 PM
XL 2007 Toolbar Disaster Native Excel Discussion (Misc queries) 3 November 16th 07 03:06 PM
Run-Time error 1004 issue just not making sense robs3131 Excel Programming 3 June 5th 07 05:24 AM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Duplicate Disaster Zip Codes Excel Discussion (Misc queries) 3 June 13th 05 05:02 PM


All times are GMT +1. The time now is 12:36 AM.

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"