Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

GP-Excel_macro_issue

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Team,

Client has an instance of Nav GP running, uses Excel macros (Excel 2013).  One macro has been returning an error since last good run on 3/24/17.  Error is generic, Run-time error '1004' - Application-defined or object-defined error.  Debug shows this (screen shot below.)  Any ideas?  Thanks in advance!  -JTS

*This post is locked for comments

  • Suggested answer
    KirkLivermont Profile Picture
    KirkLivermont 5,985 on at
    RE: GP-Excel_macro_issue

    That date sounds suspiciously close to the last office updates from Microsoft. I would uninstall the update and try it again.

    Regards,

    Kirk

  • Tim Wappat Profile Picture
    Tim Wappat 5,703 on at
    RE: GP-Excel_macro_issue

    Don't worry screen shot is fine when you click on it. 

    So from what I can see you have an Excel macro that scrolls down looking for where the invoice number changes in a column from one invoice number to another. 

    I can't see what follows to see where it breaks out of the loop, I guess its running off the bottom of the excel sheet before it breaks out the loop for some reason. Difficult to diagnose with just a screen shot.

    tim

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP-Excel_macro_issue

    OK, found the insert media button but resolution is very poor, shown in separate post below.  Client uses Dynamics GP solution, but the issue is really with an Excel macro that is used to import data directly into GP, and this macro now errors when run, as described.

    Thanks Tim.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP-Excel_macro_issue

    vb_5F00_script_5F00_debug_5F00_error.png

  • Tim Wappat Profile Picture
    Tim Wappat 5,703 on at
    RE: GP-Excel_macro_issue

    If you click on the Insert/Edit Media button you can upload file from your computer to the forum.

    Also is this a Dynamics GP or Dynamics NAV question?

    Tim

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP-Excel_macro_issue

    Won't let you upload the screen shot.  Debug shows script halting during a process:

    "Do Until ReadRow > ReadEnd -1" - highlighted line about six lines below reads:

    "ReadRow = ReadRow +1

    InvoiceNumber = ActiveSheet.Cells (ReadRow, InvoiceNoCol)"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,375 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans