Statements used in manipulating file contents must be appropriate to the mode in which the file was opened. This error has the following causes and solutions:

  • Put or Get statement is specifying a sequential file. Put and Get can only refer to files opened for Random or Binary access.
  • Print # statement specifies a file opened for an access mode other than Output or Append. Use a different statement to place data in the file or reopen the file in an appropriate mode.
  • An Input # statement specifies a file opened for an access mode other than Input. Use a different statement to place data in the file or reopen the file in Input mode.
  • You attempted to write to a read-only file. Change the read/write status of the file or don’t try to write to it.
[efb_likebox fanpage_url="https://www.facebook.com/vbamarket/" box_width="840" box_height=340"" responsive="1" show_faces="1" show_stream="1" hide_cover="1" small_header="0" hide_cta="0" locale="en_US"]