LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Object required??? What object?

Here is the code that I am using and it is stored in the worksheet
itself. Is this the problem? Why else woudl I be getting Object
Required error?

Thanks,
Jay

Sub HeidDay()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False

Dim i, c
Dim Rng As Range
Dim Rnge As Range
Dim Target As Range

Range("A5:HW1000").Sort Key1:=Range("A5"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
_
DataOption1:=xlSortNormal

Set Target = Sheet19.Range("A5")
Do Until Target.Value = ""
If Target.Value <= Date - 90 And DatePart("ww", Target.Value)
= _
DatePart("ww", Target.Offset(1, 0).Value) Then

Set Rng = Sheet19.Range(Cells(Target.Row, 2), _
Cells(Target.Row, 41))
Set Rnge = Sheet19.Range(Cells(Target.Row, 207), _
Cells(Target.Row, 220))

For Each i In Rng
If IsNumeric(i.Value) And
IsNumeric(i.Offset(1, 0).Value) Then
i.Value = i.Value + i.Offset(1, 0).Value
End If
Next i

For Each c In Rnge
If IsNumeric(c.Value) And
IsNumeric(c.Offset(1, 0).Value) Then
c.Value = c.Value + c.Offset(1, 0).Value
End If
Next c

Sheet19.Range(Cells(i.Row + 1, 1), Cells(i.Row + 1,
41)).Delete _
Shift:=xlUp
Sheet19.Range(Cells(c.Row + 1, 207), Cells(c.Row + 1,
220)). _
Delete Shift:=xlUp
Else
GoTo P
End If
P:
Set Target = Target.Offset(1, 0)
Loop
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
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
R/T 424 - Object required Help Jim May Excel Discussion (Misc queries) 2 April 10th 08 03:01 PM
Runtime error '424': Object Required loren.pottinger Excel Discussion (Misc queries) 1 August 28th 06 09:56 PM
Object Variable Not Set Error on Selection object Jean Excel Worksheet Functions 3 July 24th 06 06:45 PM
"Microsoft Visual Basic runtime error '424' object required". SharonG. Excel Worksheet Functions 0 July 5th 06 01:36 AM
Object Required aftamath Excel Discussion (Misc queries) 2 March 14th 06 10:19 PM


All times are GMT +1. The time now is 07:03 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"