View Single Post
  #8   Report Post  
Old August 13th 19, 10:13 AM posted to microsoft.public.excel.programming
RG III RG III is offline
external usenet poster
 
First recorded activity by ExcelBanter: May 2019
Posts: 64
Default Why the heck doesn't this work?

On Tuesday, June 4, 2019 at 1:54:31 AM UTC-7, GS wrote:

'Get the file contents and parse each line
vText = Split(ReadTextFile(sFile), vbCrLf)


Garry,

What if the above line crashes for any reason? Like if the
file referenced by "sFile" does not exist? If there's an error
of any kind while reading the file, I'd like vText to contain
the empty string "". How do I do that?

Thanks!