Reciepes error

Reciepes error

Hello I'm using this code to read every reciepe in zenon project
VBA Code:

dim zreciepe as reciepe
For i = 0 To thisProject.Recipes.Count - 1
Set zreciepe = thisProject.Recipes.Item(i)
next

It works fine if I run it with Microsoft Visula Basic for Applications.
But when I run it in zenon project sometimes I get "Method 'Recipes' of object 'IProject' failed"
Can you help me find what am I missing here?

This is a migrated post! Originally posted on 11.09.2014 by user ktech. Please be aware that information can be outdated.