View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Object variable or with Block variable not set

Hi Howard,

Am Thu, 3 Oct 2013 10:05:04 +0200 schrieb Claus Busch:

If Not rngFndPrd Is Nothing Then
rngFndPrd.Offset(0, 5).Copy
Sheets("Sheet1").Range("F100").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlPasteAll, Transpose:=False
End If


better without copy and paste:

Application.ScreenUpdating = False
For Each c In ws1Part_Num

Set rngFndPrd = ws2From_Item.Find(c, LookIn:=xlValues, _
lookat:=xlWhole)
If Not rngFndPrd Is Nothing Then
Sheets("Sheet1").Range("F100").End(xlUp)(2) _
= rngFndPrd.Offset(0, 5)
End If

Next
Application.ScreenUpdating = True


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2