Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This was working for me, and I must have change something to get the variable not set error.
Thanks. Howard Option Explicit Sub FindNewPN() Dim rngFndPrd As Range Dim c As Range Dim ws1Part_Num As Range Dim ws2From_Item As Range Set ws1Part_Num = Sheets("Sheet1").Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row) Set ws2From_Item = Sheets("Sheet2").Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row) Application.ScreenUpdating = False For Each c In ws1Part_Num Set rngFndPrd = ws2From_Item.Find(c, LookIn:=xlValues, lookat:=xlWhole) rngFndPrd.Offset(0, 5).Copy Sheets("Sheet1").Range("F100").End(xlUp).Offset(1, 0).PasteSpecial _ Paste:=xlPasteAll, Transpose:=False Application.ScreenUpdating = True Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Runtime Error '91' Object variable or With block variable not set | Excel Discussion (Misc queries) | |||
Error Number: 91 object variable or With block Variable not set | Excel Programming | |||
Getting inconsistent Error 91-Object variable or With block variable not set | Excel Programming | |||
Run-time error '91': "Object variable or With block variable not set | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming |