Add An Error Message

Horse06Horse06 Member Posts: 496
I have a a pogram to export the data in excel format. Everything is fine, but I have encountered a pop-up message as below when there are no data retrieved.
This message is for C/AL programmer:
An exception was raised in method rangne. THe OLE control or Automation server has returned error(HRESULT)-2147352567. The component did not provide the exception description.

Is there any way to write a message like "No data were found" instead of the system message. Appreciate it!

Comments

  • shogan@mila.ieshogan@mila.ie Member Posts: 113
    There is an ERROR function...

    http://msdn.microsoft.com/en-us/library/dd355305.aspx

    May be of some use! :D
  • GRIZZLYGRIZZLY Member Posts: 127
    I think the error raised when you are accessing range, which is not exists. Are you using named ranges? It is a couple of cells, which have there name?
    In that case you should always check if name range exist or no before exporting values.
    Sincerely yours, GRIZZLY
    Follow my blog at http://x-dynamics.blogspot.com
  • Horse06Horse06 Member Posts: 496
    I tried to retrieve the data from the date range. For example, I enter the date range from 7/10/11..7/20/11 and if there are no data retrieved, there is an system error. Otherewise everything is fine. Thank you!
Sign In or Register to comment.