RowNum substituted for your paragraph...
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-1],Deliveries!R8C2:R" & RowNum & "C35,32,FALSE)"
--
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
(Extras for Excel add-in: convenience built-in)
"Andy"
wrote in message
...
Hi Everyone
I have this code in Excel 2007 VBA
It has a value of say 1500 in lnLastNonBlankRowNumberDeliveries
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-1],Deliveries!$B$8:$AI$" &
lnLastNonBlankRowNumberDeliveries & ",32,FALSE)"
I'm getting an "Application-defined or object-defined" error. Can
someone help me out.
Andy