View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Continuing problem populating userform from a previous record

y does not have a value in ...
Set lastrow = Cells(y, 1)
--
Jim Cone
San Francisco, USA

(top posting is preferred)
http://www.officeletter.com/blink/specialsort.html



"Dooley007"
wrote in message
Jim Cone wrote:
You have to tell Excel what a range is referring to before you use it.
The With statement has to come after the Set statement.
The "With lastrow" and "End With" should be removed...
'----------------------
With lastrow
Set lastrow = Cells(y, 1)
' .End(xlToLeft)
End With
'----------------------
Looks like your spell checker isn't working either.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



Jim

Thanks for the quick reply. It still comes up with the same error in
the same line.

Dooley007