Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default defining a range compile error

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default defining a range compile error

code works fine for me.

--
Regards,
Tom Ogilvy

"Janis" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
VBAProject name compile error, not defined at compile time Matthew Dodds Excel Programming 1 December 13th 05 07:17 PM
error message: compile error, argument not optional Pierre via OfficeKB.com Excel Programming 3 September 5th 05 03:45 PM
Error 1004 when defining range by cells(r,c) format dave Excel Programming 8 May 18th 04 08:51 PM


All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"