on 02-05-2009 11:13 AM
Hi
Im trying to update gl determination from Excel and getting the error 'object doesn't support this property or method' using the following code
Dim oCompanyService As SAPbobsCOM.CompanyService
Dim oPeriodCategoryColl As PeriodCategoryParamsCollection
Dim oPerCategory As PeriodCategory
'get company service
Set oCompanyService = oCmp.GetCompanyService
'get period category Collection
Set oPeriodCategoryColl = oCompanyService.GetPeriods()
'get period category
Set oPerCategory = oCompanyService.GetPeriod(oPeriodCategoryColl.Item(0))
'set the Default sales account
oPerCategory.DefaultSaleAccount = 400010
'update period category
oCompanyService.UpdatePeriod (oPerCategory)
Its the last line that gets the error message
The same code without the 'sets' works in vb 2005 but i need to do it from Excel
Any help gratefully received as i'm losing hair by the handfull
Thanks
Andy McKenny
Hi Andy,
Try to Use
'update finance period
oCompanyService.UpdateFinancePeriod(oFinancePeriod)
Mohamed Zubair
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorted, forgot need call statement in vb6/vba:
Call oCompanyService.UpdatePeriod(oPerCategory)
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunatey i cant use the FinancePeriod object as it does not countain the gl determination properties as they belong to period category which is the next level up
Regards
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.