Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Open for Input & Output Simultaneously

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    In an Excel macro, can you have the same file open for input and open for output simultaneously?
    Mechanic

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Location
    Greenwood, SC
    Posts
    677
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Don't think so, at least not if you are using:

    Open "Filename" for Input as #1
    and
    Open "Filename" for Output as #2

    If you want to read some data, then write some data, then read some data, etc. you would probably want to read the whole file into an array (or some such container), close it, manipulate the array, then open the file again and write the data out.

    If you have more specifics, I'd be glad to hear them...

    K

    [ This Message was edited by: kkknie on 2002-05-10 08:42 ]

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    There reaally isn't much to tell, I want to look through a file until I find a special charcter and either delete all records in the file until I encounter the next special character, or replace all records between those special characters with records from another file.

    Mechanic

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •