View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Object Required Error

It needs a range:

Sub qwerty()
Set ws1 = Sheets("Sheet1")
n = ws1.Cells("65536", "A").End(xlUp).Row + 1
Set r = Cells(n, "A")
With r
Set rng1 = .EntireRow
Set rng2 = .Offset(1, 0)
End With
End Sub

--
Gary''s Student - gsnu200794


"Minitman" wrote:

Greetings,

I getting this error message:

_________________________
| |
| Run-time error '424': |
| Object required |
|________________________|

From this code:
_______________________________________________

With ws1.Cells("65536", "A").End(xlUp).Row + 1
Set rng1 = .EntireRow
Set rng2 = .Offset(1, 0)
End With
_______________________________________________

I'm trying to locate the row just below the last row without much
luck!!!

How can I change this code to work?

Anyone help on this problem will be appreciated.

-Minitman