' Create an instance of FileSystem Object and store it into a variable called fileSysObj
Set fileSysObj = createObject("Scripting.FileSystemObject")
' Check whether the read file exists
IF (fileSysObj.FileExists(read)) Then ' if the file exists, then open it for reading Set tf = filesysobj.OpenTextFile(read, 1) read = tf.ReadLine tf.Close ELSE ' if you can't find read.text, display default message read = "I can't find the file read.txt! So this is my default message."
use the code above, click and drag your mouse over the code to highlight it. Then right click on the highlighted code and click "Copy." Now you may paste it into your code editor.