web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Executing Dynamics AX add-in commands from macro VBA code

(0) ShareShare
ReportReport
Posted on by

Somebody knows how to call Dynamics AX -> Refresh All action (Excel add-in) in VBA code (macro)?

Building some Excel application based on Dynamics AX data (export, import) but forcing user to find proper function in ribbon is inconvenient (sometimes ribbon even looses focus and user needs to select a cell inside source table before he can execute commands).

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    I would like this functionality as well!

  • KlonEntek Profile Picture
    5 on at

    I have used the sendkeys function to refresh all from VBA.

    Application.SendKeys "%Y1R~"

    This is what the characters mean: % = Alt, Y1 = The Dynamics AX Tab, R = Refresh, ~ = Enter

    you should check to see if your AX is linked to Y1, it might be different from mine. to check press the Alt key while in  Excel and you will see the sendkey values for the ribbon.

    you may want to read up on sendkeys before you start using it. if used incorrectly you can break things.

    also you cannot, or at least I have not found how to run this in the middle of a macro reliably. run by its self or at the end of a macro seems to work fine.

    I am trying to figure out how to run it in the middle so I can automate the process for my users.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans