'Create the object
Dim vStockTaking As SAPbobsCOM.StockTaking
Set vStockTaking = vCompany.GetBusinessObject(oStockTakings)
'Set the object's properties
vStockTaking.ItemCode = "U00003"
vStockTaking.WarehouseCode = "01"
vStockTaking.Counted = 10
If (vStockTaking.Add() <> 0) Then
MsgBox ("Failed on StockTaking")
End If