Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1076833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:29:19+00:00 2026-05-16T21:29:19+00:00

I just wrote this function to read a series of email addresses from a

  • 0

I just wrote this function to read a series of email addresses from a linebreak-delimited text file. And it does work, but that’s not my question.

Function GetEmailArray(FileName As String) As String()
    Dim TempArr() As String
    Dim i As Integer

    Open FileName For Input Access Read As #1
    Do While Not (EOF(1))
        i = i + 1
        ReDim Preserve TempArr(i + 1)
        Line Input #1, TempArr(i + 1)
        Debug.Print TempArr(i + 1)
    Loop
    Close #1
    GetEmailArray = TempArr
End Function

Reading this, I would expect this to:

  1. Read the first line, store it in TempArr(1)
  2. Loop
  3. Read the first line AGAIN, store it in TempArr(2)
  4. Loop
  5. Etc

I just can’t figure out how the while loop goes to the next line in the text file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:29:20+00:00Added an answer on May 16, 2026 at 9:29 pm

    You’re holding a handle (#1) to the file from the point you call Open, until you call Close. Behind the scenes (on the O/S level), the handle retains a current file position as part of the file descriptor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(VB.NET, .NET 3.5) I wrote the following function to read some text from txt
Just for fun, I wrote this simple function to reverse a string in Python:
I just wrote a very simple perl tk script to read a huge text
I'm just wondering if there is a best case to write this code: $('#set_duration_30').click(function(event)
I just wrote this into my WebForms .aspx: <span id=GenerateChartButton runat=server></span> I went to
I'm really confused, I just wrote this x = 0 y = 42 #Can
I wrote a program to solve a complicated problem. This program is just a
I've created this function to read a word. I got segmentation fault and I
I wrote this little function for writing out HTML tags: def html_tag(tag, content=None, close=True,
I wrote a function that tries to get a y/n (yes/no) answer from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.