Reset Statement

Syntax

Reset

Description

Closes all currently open files.

Rules at a Glance

  • Reset only closes those files that were opened using the Open statement.

  • The contents of any current file buffers are written to disk by the Reset statement immediately prior to Reset, thereby closing the respective files.

Programming Tips and Gotchas

The Reset statement should be used only as a last resort to clean up if your program is terminating abnormally. Normally, you should write code to close each open file using the Close statement.

See Also

Close Statement, Open Statement

Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.