VBA Function EOF

BetterSolutions.comBetterSolutions.com
  • Resources
  • Microsoft Office Excel
  • Microsoft Office Word
  • C# Programming
  • JavaScript Programming
  • Add-ins
  • Office Add-ins for Excel
  • Office Add-ins for Word
  • Consultancy
  • Macros, Templates and EUDAs
  • TypeScript and JavaScript
  • Development
  • Office JS Add-ins and Scripts
  • End User Programming
  • Support
  • VSTO and .NET Migration
  • Troubleshooting
  • Training
  • Microsoft 365 Integration
  • Please Contact Us Today for a FREE Consultation
  • Excel
      • Add-ins
      • Best Practices
      • Cells Ranges
      • Charts
      • Conditional Format
      • Data Analysis
      • Data Validation
      • Dates Times
      • Search Excel ...
      • Functions
      • User Defined
      • Formulas
      • Formatting
      • Finance
      • Illustrations
      • Importing
      • Layout
      • Our Services ...
      • Macros
      • Named Ranges
      • Options
      • Pivot Tables
      • Power Query
      • Protection
      • Reviewing
      • Ribbon
      • Find Add-ins ...
      • Rows Columns
      • Shortcut Keys
      • Tables
      • Templates
      • Track Changes
      • Workbooks
      • Worksheets
      • XML
      • Contact Us ...
  • Word
      • Add-ins
      • Bookmarks
      • Building Blocks
      • Bullets
      • Characters
      • Charts
      • Content Controls
      • Design
      • Search Word ...
      • Documents
      • Fields
      • Illustrations
      • Importing
      • Layout
      • Macros
      • Mailings
      • Numbering
      • Our Services ...
      • Options
      • Outlines
      • Pages
      • Paragraphs
      • Protection
      • References
      • Reviewing
      • Ribbon
      • Find Add-ins ...
      • Sections
      • Shortcut Keys
      • Styles
      • Tables
      • Templates
      • Text Boxes
      • Track Changes
      • XML
      • Contact Us ...
  • PowerPoint
      • Add-ins
      • Animation
      • Bullets
      • Characters
      • Charts
      • Design
      • Handouts
      • Illustrations
      • Search PowerPoint ...
      • Importing
      • Layout
      • Macros
      • Notes
      • Numbering
      • Options
      • Outlines
      • Paragraphs
      • Our Services ...
      • Presentations
      • Protection
      • References
      • Reviewing
      • Ribbon
      • Sections
      • Shortcut Keys
      • Slide Show
      • Find Add-ins ...
      • Slides
      • Tables
      • Templates
      • Text Boxes
      • Track Changes
      • Transitions
      • Video
      • XML
      • Contact Us ...
  • Outlook
      • Add-ins
      • Address Book
      • Alerts
      • Appointments
      • Calendar
      • Contacts
      • Events
      • Exchange
      • Search Outlook ...
      • Folders
      • Forms
      • Groups
      • HTML
      • Illustrations
      • Importing
      • Journal
      • Macros
      • Our Services ...
      • Mail
      • Meetings
      • Notes
      • OneDrive
      • OneNote
      • Options
      • People
      • Proofing
      • Find Add-ins ...
      • Ribbon
      • Rules
      • Search
      • SharePoint
      • Shortcut Keys
      • Tasks
      • Web Client
      • XML
      • Contact Us ...
  • VBA
      • Add-ins
      • Arrays
      • Best Practices
      • Class Modules
      • Code Snippets
      • Collections
      • Controls
      • Databases
      • Search VBA ...
      • Data Types
      • Dates Times
      • Debugging
      • Enumerations
      • Error Handling
      • Events
      • Files Directories
      • Functions
      • Our Services ...
      • Macros
      • MsgBox
      • Numbers
      • Options
      • References
      • Ribbon
      • Shortcut Keys
      • SQL
      • Find Add-ins ...
      • Strings
      • Subroutines
      • Syntax
      • Userforms
      • Variables
      • Visual Basic Editor
      • Web Interaction
      • XML
      • Contact Us ...
  • C#
      • .NET Library
      • Arrays
      • Best Practices
      • Classes
      • Collections
      • Databases
      • Data Types
      • Dates Times
      • Search C# ...
      • Debugging
      • Excel Interop
      • Error Handling
      • Files Directories
      • Generics
      • Interfaces
      • MessageBox
      • Numbers
      • Our Services ...
      • Projects
      • Serialization
      • Strings
      • Structures
      • Syntax
      • Threading
      • Variables
      • VBA Migration
      • Find Add-ins ...
      • Visual Studio
      • VSTO Add-ins
      • Web Add-ins
      • Web Development
      • Web Services
      • Windows Forms
      • WPF Forms
      • XML
      • Contact Us ...
  • JS
      • Arrays
      • Custom Functions
      • Data Types
      • Dates Times
      • Debugging
      • Dialog Boxes
      • Error Handling
      • Excel API
      • Search JavaScript ...
      • Express Backend
      • Fluent UI
      • Functions
      • HTML Pages
      • Microsoft Graph
      • Node JS Runtime
      • Numbers
      • Objects
      • Our Services ...
      • Office Add-ins
      • Office Events
      • Office Manifest
      • Office Scripts
      • Outlook API
      • PowerPoint API
      • React Library
      • Ribbon Commands
      • Find Add-ins ...
      • Strings
      • Syntax
      • Task Panes
      • TypeScript
      • Variables
      • Visual Studio Code
      • Word API
      • Yeoman Generator
      • Contact Us ...
  • Software Development Services
    • High Value Consultancy
    • VBA Templates and Macros
    • Office Scripts and EUDAs
    • VSTO and .NET Migration
    • Bespoke Office Add-ins
    • Long-Term Technical Support
    • Contact Us
VBA > Functions
  • VBA Programming
  • Functions
  • EOF
  • Input & Output
  • Complete List
  • Alphabetical - E
  • Index - E
  • Updated: 01 January 2025
  • 01 January 2025
EOF
EOF(filenumber)

Returns the value indicating if the end of a file has been reached (Boolean).

filenumberThe number of the file (Integer).
REMARKS
* The actual value returned is either 1 or 0 to specify True or False.* This function should be used to test for the end of a file which has been opened for Random or Sequential input.* Any files open for Output, this function will return True.* This function should be used to avoid the error when you read past the end of a file.* This function returns False, until the end of the file has been reached.* This function returns True, when the end of the file has been reached.* Any files opened for Random or Binary access, this function returns False until the last executed GET statement is unable to read an entire record.* Any files opened for Binary access that use the Input() function will generate an error ?* You can use the CLOSE statement to close a text file.* You can use the GET statement to read data from a text file into a record.* You can use the OPEN statement to open a text file or csv file.* You can use the PRINT statement to write display formatted data to a sequential file.* You can use the WRITE statement to write data to a sequential file.* You can use the LOF function when reading from Binary files with Input.* You can use the LOC function when reading from Binary files with Input.* The equivalent .NET function is [[Microsoft.VisualBasic.FileSystem.EOF]]* For the Microsoft documentation refer to learn.microsoft.com
Do While Not EOF(1) TextLine = LineInput(1) MsgBox(TextLine) Loop © 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top

Từ khóa » Visual Basic Do Until Eof