Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default application defined or object defined error

Hi i have an error at this point in my module saying application
defined or object error defined error.
error 1004

' Check the next nearby spot for our item.
If ([Environment].Offset(shopper.Offset(0, 2) + Row, _
shopper.Offset(0, 3) + Column) = _
shopper.Offset(0, 6)) Then

this is the full program
---------------------------------------------------------------------------------------
' This is the nearby area scanning routine.
Sub LookAround(shopper As Range)

' Check the eight neighbouing squaree to see if our item is
nearby.
For Row = -1 To 1

' For simplicity we will check our own square too,
' but do not expect to ind the item we seek.
For Column = -1 To 1

' Check the next nearby spot for our item.
If ([Environment].Offset(shopper.Offset(0, 2) + Row, _
shopper.Offset(0, 3) + Column) = _
shopper.Offset(0, 6)) Then

' Note that we have found the item of interest.
shopper.Offset(0, 5) = "Found"
Exit For
End If

Next Column

Next Row

End Sub
-------------------------------------------------------
Please let me know the solution ASAP
Regards,
Ram

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default application defined or object defined error

On Sep 4, 10:00 am, JE McGimpsey wrote:
You haven't given enough information:

How is Environment defined? What are the values in shopper.Offset(0, 2),
shopper.Offset(0, 3) and shopper.Offset(0, 6)?

In article .com,

wrote:
Hi i have an error at this point in my module saying application
defined or object error defined error.
error 1004


' Check the next nearby spot for our item.
If ([Environment].Offset(shopper.Offset(0, 2) + Row, _
shopper.Offset(0, 3) + Column) = _
shopper.Offset(0, 6)) Then


this is the full program
------------------------------------------------------------------------------
---------
' This is the nearby area scanning routine.
Sub LookAround(shopper As Range)


' Check the eight neighbouing squaree to see if our item is
nearby.
For Row = -1 To 1


' For simplicity we will check our own square too,
' but do not expect to ind the item we seek.
For Column = -1 To 1


' Check the next nearby spot for our item.
If ([Environment].Offset(shopper.Offset(0, 2) + Row, _
shopper.Offset(0, 3) + Column) = _
shopper.Offset(0, 6)) Then


' Note that we have found the item of interest.
shopper.Offset(0, 5) = "Found"
Exit For
End If


Next Column


Next Row


End Sub
-------------------------------------------------------
Please let me know the solution ASAP
Regards,
Ram


Hi,
These are the offsets values
Agent Name Active Row Column Symbol Status Target Item Target Row
Target Column Remembered Item Remembered Row Remembered Column
Frustration Items Found Trips
(Offset 0) (Offset 1) (Offset 2) (Offset 3) (Offset 4) (Offset 5)
(Offset 6) (Offset 7) (Offset 8) (Offset 9) (Offset 10) (Offset 11)
(Offset 12) (Offset 13) (Offset 14)

Regards,
Ram

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default application defined or object defined error

On Sep 4, 10:00 am, JE McGimpsey wrote:
You haven't given enough information:

How is Environment defined? What are the values in shopper.Offset(0, 2),
shopper.Offset(0, 3) and shopper.Offset(0, 6)?

In article .com,





wrote:
Hi i have an error at this point in my module saying application
defined or object error defined error.
error 1004


' Check the next nearby spot for our item.
If ([Environment].Offset(shopper.Offset(0, 2) + Row, _
shopper.Offset(0, 3) + Column) = _
shopper.Offset(0, 6)) Then


this is the full program
------------------------------------------------------------------------------
---------
' This is the nearby area scanning routine.
Sub LookAround(shopper As Range)


' Check the eight neighbouing squaree to see if our item is
nearby.
For Row = -1 To 1


' For simplicity we will check our own square too,
' but do not expect to ind the item we seek.
For Column = -1 To 1


' Check the next nearby spot for our item.
If ([Environment].Offset(shopper.Offset(0, 2) + Row, _
shopper.Offset(0, 3) + Column) = _
shopper.Offset(0, 6)) Then


' Note that we have found the item of interest.
shopper.Offset(0, 5) = "Found"
Exit For
End If


Next Column


Next Row


End Sub
-------------------------------------------------------
Please let me know the solution ASAP
Regards,
Ram


Hi,
As i had sent that offset values more to say offset 2 is row, offset 3
is column and offset 6 is target item and offset 5 is status.

Regards,
Ram

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default application defined or object defined error

You still haven't said what the *values* are in those cells, nor how
'Environment' is defined...

In article .com,
wrote:

As i had sent that offset values more to say offset 2 is row, offset 3
is column and offset 6 is target item and offset 5 is status.



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
Run-time error '50290': Application-defined or object-defined erro Macro button Excel Discussion (Misc queries) 1 March 12th 09 10:59 AM
Copying A Range of Cells From one Sheet to Another - Error Application Defined or Object Defined Matt[_39_] Excel Programming 3 July 25th 06 01:13 AM
Runtime error 1004- application defined or object defined erro Novice Excel Programming 0 February 6th 06 09:34 PM
Runtime error 1004- application defined or object defined erro Novice Excel Programming 1 February 6th 06 09:33 PM
Runtime error 1004- application defined or object defined erro Jim Thomlinson[_5_] Excel Programming 0 February 6th 06 09:29 PM


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