Hello,
how can I access values from a navision table in a VBA program, like the NL() function
does in Excel?
The VBA programm must run every second to check if there is a new order - if so,
it print out a report an then waits again for the next order.
Any ideas?
Thanks for any suggestion
Christian
2 comments
-
Jet Reports Historic Posts HI Christian,
You could create an NL function to read the value and just fresh the report every second and check the cell value. You can run the report from a macro like this:
Application.Run "JetReports.xlam!JetMenu", "Refresh"
See this article: http://kb.jetreports.com/article/AA-00546/0/ Does that help?
Regards,
Hughes -
Jet Reports Historic Posts Hi Hughes,
thanks for the answer! I spent many ours on trying to find a solution.
The solution from the article you mentioned is ok - but there is the problem, that
the multiple usage of the functions
XLApp.Application.Run "JetReports.xla!JetMenu", "Design" and
XLApp.Application.Run "JetReports.xla!JetMenu", "Refresh"
in a program loop brings up a out of memory in excel after 600 to 800 loops.
So I tried to leave Excel all 30 minutes and restarted it. But there is obviously an other
problem - after 9 to 30 loops, it is no more able to leave excel with application.quit.
Excel closes the workbook but not itself.
Regards,
Christian