Delen via


File's open mode wasn't set to a valid value

The value supplied for the file's open mode was not valid. The following table shows valid values for the OpenMode enumeration.

Value

Mode

1

OpenMode.Input

2

OpenMode.Output

4

OpenMode.Random

8

OpenMode.Append

32

OpenMode.Binary

To correct this error

  • Verify the value being supplied for the file's open mode.

See Also

Reference

OpenMode Enumeration

My.Computer.FileSystem Object

Other Resources

Reading from Files in Visual Basic

Writing to Files in Visual Basic