Skip to Content
0
Sep 25, 2014 at 01:59 AM

Journal Entry Excel Macro via UI API. Error: Form - Bad Value

125 Views

Hi all,

I have an excel macro that creates a JE in SAP B1 via UI API.

It just opens the JE form and sets the values in the relevant columns from the spread sheet.

All works fine with GL accounts.

For BP codes however, I haven't been able to make it work.

Normally you would use CTRL+TAB to set the BP code.

Code for setting this value is as follows:

Set oEdit = oMatrix.Columns.Item("1").Cells.Item(iRow - 5).Specific() 'GL Acc

oEdit.Value = Cells(iRow, Range("JE_Lines[Account Code]").Column).Value

Error is as follows: Form - Bad Value

Can anyone assist on setting this value with a BP Code via UI API?

Thanks!

John