LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default VBA Help needed -- compile error: object required

This code always gives me the error above. I have no idea what's wrong with
this
The point is to go through a list of dates and if they are less than say
1/1/2005 (my start date entered in the spreadsheet) change them to 0 and
keep others as is. But this doesn't seem to work at all. Could anyone pls
help me? Thanks

Sub click()

Dim counter As Integer
Dim curCell As Date
Dim startDate As Date
Dim endDate As Date


Range("e1").Value = startDate

For counter = 1 To 20
Set curCell = Worksheets("sheet1").Cells(counter, 3)
If curCell.Value < startDate.Value Then curCell.Value = 0
Next counter
End If

End Sub
 
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
Object Required Error Cody Excel Programming 14 August 23rd 05 12:31 AM
Object required error Peter Rump Excel Programming 5 August 15th 05 09:52 AM
Error: 424 Object required DavidM[_3_] Excel Programming 1 January 13th 05 03:23 PM
Object Required Error Steph[_3_] Excel Programming 3 August 13th 04 03:26 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


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

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

About Us

"It's about Microsoft Excel"