Results 1 to 3 of 3
  1. #1
    allenjasonbrown@gmail.com is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    44

    Application Defined Error

    Hi - I have a procedure which is writing to excel. It calls a sub procedure to sort the data.



    The code for sorting start with...
    Code:
    For Each row in xlSheet.Range(xlsheet.Cells(datastartrow + (( v-1) ..............
    This all works great.

    BUT....If I call a different sub routine and then try and call the sorting routine from there I get an Application defined error.


    Anyone know why I can call the sorting procedure from the main routine but not a sub routine?

    Thanks in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Would have to examine all relevant code. If you want to provide db, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Mahendra1000 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    101
    As June7 suggested please post a copy of your db for better understanding

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Application-defined or object-defined error
    By SYFYLADY in forum Access
    Replies: 4
    Last Post: 03-05-2014, 05:25 PM
  2. Replies: 3
    Last Post: 11-12-2013, 04:13 PM
  3. Replies: 1
    Last Post: 03-14-2013, 12:39 PM
  4. Recurring Change Event Erroe
    By dccjr in forum Programming
    Replies: 2
    Last Post: 02-18-2013, 08:26 PM
  5. Application-defined or object-defined error
    By hawkins in forum Access
    Replies: 6
    Last Post: 07-01-2011, 01:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums