Re: defining a range compile error

Tech-Archive recommends: Fix windows errors by optimizing your registry



code works fine for me.

--
Regards,
Tom Ogilvy

"Janis" <Janis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:72F6BBD1-79C2-45B4-8C01-59843F91434E@xxxxxxxxxxxxxxxx
I get an invalid procedure call on defining the Rng variable. Why is that
it
looks like it should work.

Thanks,

Sub deleteDateRow1()
Dim Rng As Range
Set Rng = Range("A1")
With Rng
If IsDate(.Value) Then
FrReptDate = .Value
ToReptDate = .Offset(0, 1).Value

.EntireRow.Delete Shift:=xlUp
Else
Exit Sub
End If
End With
End Sub


.


Quantcast