run time error 1004
when i run the code given below, sometimes i get "error 1004, select method
of range class failed"
error comes in line Sheet8.Range("M5").Select
interesting thing is i get this error only some of the time.
when i am running this module independently, no error comes.
when i call this module from some other module then the error comes.
this code resides in module and the code from which i call for this module
is also written in module (none are in sheet)
please help!!
regards
pradip
Public Sub RevertMod()
'
' Revert Macro
' Macro recorded 4/20/2005 by 112968
'
'
Dim Days As Integer
Days = Sheet8.Range("B1")
Sheet8.Range("M5").Select
ActiveCell.Offset(Days, 0).Range("A1").Select
ActiveCell.GoalSeek Goal:=Sheet8.Range("j1"), ChangingCell:=Sheet8.Range("J2")
Sheet8.Range("A1").Select
End Sub
|