Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2794

Re: Mass Cancellation of A/R Invoice, A/R Credit Memos

$
0
0

Hi Ajay

 

From Excel 2007 onwards, you need to save the file as .xlsm which is a Macro enabled format. You may also need to trust the file, or else it will prompt every time you open the Workbook. You can change the security settings in Excel to always allow the macro. Save the file now even if you haven't got any data in a sheet yet.

 

Then go to File > Options > Customize Ribbon. Find Developer in the right hand side window and make sure it is selected. Now go back into Excel and you should have another Ribbon called Developer.

 

Select Developer and then Visual Basic button. In Visual Basic, go to Tools > References and scroll down the list till you find SAP Business One DI API 9.0. You will not find a 9.1 as it is still compatible with version 9.0.

 

On the left side you should have a Project window. If you do not see it, press CTRL-R. Now you can right click on the Project Window for your Excel file and select Insert > Module. This will add a new module on the right side of the Project Window. Paste the code I sent you into this window.

 

To run, make sure you have some data in the current Sheet, you can use F8 to step through or F5 to run. You can also add a button in the Excel Sheet to run the macro. From the Developer Ribbon, select the Insert Controls button, then add a button. It will prompt you for a Macro name, just select Cancel_Docs from the list.

 

Let me know how you go.

 

Kind regards

 

Peter Juby


Viewing all articles
Browse latest Browse all 2794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>