Just for consultation purpose , I want to maintain the in-belt Ribbon preview button and at the same time adding my excel export other programs export function in my ms access app.kindly see whether this is okay with you.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Public Function exportToXLSX(ctl As IRibbonControl)Dim curPath As StringcurPath = CurrentProject.Path & "\YourExcel"DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "YourTable", curpath, TrueEnd Function
Open in new window
and the functionOpen in new window
Last but not least you need a reference to Microsoft Office 16 Object Library (change 16 to your version)