advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WRITE # Statement Details
  Summary  Details  Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 WRITE #filenumber% [,expressionlist]
 
 Usage Notes
   ■ Any reference to WRITE #filenumber% where filenumber% represents SCRN:
     or CONS: is not allowed with forms and causes Visual Basic to generate
     the error message, "Invalid when forms are showing."
 
   ■ To use the WRITE # statement with forms when printing to the screen, you
     must first unload or hide any visible forms.
     See: HIDE Method  UNLOAD Statement
 
   ■ The WRITE # statement, unlike the PRINT # statement, inserts commas
     between items and quotation marks around strings as they are written to
     the file. You do not have to put explicit delimiters in the list. A new
     line is inserted once the last item in the list has been written to the
     file.
 
   ■ If you attempt to write data to a sequential file restricted by a LOCK
     statement, Visual Basic generates the error message, "Permission denied"
     unless it is trapped by the program. All of Visual Basic's usual error-
     handling routines can trap and examine this error.
     See: Error/Event Trapping Summary