+ Reply to Thread
Results 1 to 2 of 2

VBA to write cells out to a file

  1. #1
    tmb
    Guest

    VBA to write cells out to a file

    I want to...

    open new file
    check cell data (If data="xyz" then goto close file or whatever)
    write cell data
    write a string
    move to next cell
    check cell data (If data="xyz" then goto close file or whatever)
    write cell data
    write a string
    etc
    close file

    can anyone give me sample code snippit to...
    - create/open a file
    - check cell data
    - branch on results
    - write cell data
    - write a string
    - close file

    thanks for any help




  2. #2
    Debra Dalgleish
    Guest

    Re: VBA to write cells out to a file

    You can use the macro recorder to create some of this code as you
    perform the steps manually. Then, edit the generated code.

    If you get stuck, post another question, with detail about the layout of
    your workbook, the code you have created.

    tmb wrote:
    > I want to...
    >
    > open new file
    > check cell data (If data="xyz" then goto close file or whatever)
    > write cell data
    > write a string
    > move to next cell
    > check cell data (If data="xyz" then goto close file or whatever)
    > write cell data
    > write a string
    > etc
    > close file
    >
    > can anyone give me sample code snippit to...
    > - create/open a file
    > - check cell data
    > - branch on results
    > - write cell data
    > - write a string
    > - close file
    >
    > thanks for any help
    >
    >
    >



    --
    Debra Dalgleish
    Excel FAQ, Tips & Book List
    http://www.contextures.com/tiptech.html


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1