Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error Handler
#1
Guys,

How can I handle with this error below:

ExcelSheet es.Init("Sheet1") ;
ARRAY(str) a; es.CellsToArray(a "H1:L21")
ICsv x._create
x.FromArray(a)
x.ToFile("C:\test\data.csv");; Sometimes this file is being used by another User, so I need a retry, each 5 seconds, until this process gets sucesfull

The error is 0x80070021...If I just use err; in the line above, the macro saves a blank file, which is not ok for this process.


How can I do that?

Thank you for helping.
#2
Did you try this?

;retry
x.ToFile("C:\test\data.csv")
err wait 0.5; goto retry
#3
Perfect!!!!!
Thank you!


Forum Jump:


Users browsing this thread: 1 Guest(s)