+ Reply to Thread
Results 1 to 5 of 5

EXCEL VBA

  1. #1
    VINCE
    Guest

    EXCEL VBA

    Can you help me programming in VBA ?

    I've got a sheet EXCEL with belgian payments (date, date execution, account,
    name, address, amount, communication, ...) and I'd like to transfer it to a
    ..DOC or .TXT file in a special format (fixed format from Belgian Banks
    Association). This format is the same for everybody and have a fixed lenght
    (first record for the date,date execution, ...) then one or two records per
    payment, the laste record is a check with sum of amounts, number of payments,
    .... Each record has a lenght of 128 characters and every information as a
    maximal fixed lenght and a special position fixed within the record. Am I
    clear ?

    I thought to transfer to WORD with bookmarks fixed on a special position on
    the line but I don't find how to do that and I'm wondering if there is not
    another solution.

    Every idea, example of code, ... is welkom.

    thanks in advance.


    Vince

  2. #2
    Registered User
    Join Date
    09-23-2004
    Posts
    65
    Vince,

    try to learn about the code by recording evry move you normally make.
    So start recording, and save your file as a text format. Stop recording and go and see the recorded code in the Visual Basic editor. There you can make changes to this code.
    You will find the recorder and editor on the Visual Basic toolbar.

    Zurn

  3. #3
    Franz
    Guest

    Re: EXCEL VBA

    "VINCE" <[email protected]>ha scritto nel messaggio
    [email protected]

    > Can you help me programming in VBA ?
    >
    > I've got a sheet EXCEL with belgian payments (date, date execution,
    > account, name, address, amount, communication, ...) and I'd like to
    > transfer it to a .DOC or .TXT file in a special format (fixed format
    > from Belgian Banks Association). This format is the same for
    > everybody and have a fixed lenght (first record for the date,date
    > execution, ...) then one or two records per payment, the laste record
    > is a check with sum of amounts, number of payments, ... Each record
    > has a lenght of 128 characters and every information as a maximal
    > fixed lenght and a special position fixed within the record. Am I
    > clear ?
    >
    > I thought to transfer to WORD with bookmarks fixed on a special
    > position on the line but I don't find how to do that and I'm
    > wondering if there is not another solution.


    You can save your file in CSV format.
    This should work...

    Hoping to be helpful

    Regards

    --
    Franz

    ----------------------------------------------------------------------------------------
    To reply translate from italian InVento (no capital letters)
    ----------------------------------------------------------------------------------------



  4. #4
    VINCE
    Guest

    Re: EXCEL VBA

    I've tried but it doesn't work. To be clear I give an example :

    Cell A1 = Account number (12 positions), cell A2 = Name (max 26 positions)

    I'd like to transfer it to a .doc or .txt as :

    line 1 position 4 to 15, account number and line 1 positions 16 to 41, Name
    and the next data will come on position 42, whatever is the lenght of the
    Name encoded in cell A2.

    Any idea ?

    Thanks in advance.

    Vince

    "Franz" wrote:

    > "VINCE" <[email protected]>ha scritto nel messaggio
    > [email protected]
    >
    > > Can you help me programming in VBA ?
    > >
    > > I've got a sheet EXCEL with belgian payments (date, date execution,
    > > account, name, address, amount, communication, ...) and I'd like to
    > > transfer it to a .DOC or .TXT file in a special format (fixed format
    > > from Belgian Banks Association). This format is the same for
    > > everybody and have a fixed lenght (first record for the date,date
    > > execution, ...) then one or two records per payment, the laste record
    > > is a check with sum of amounts, number of payments, ... Each record
    > > has a lenght of 128 characters and every information as a maximal
    > > fixed lenght and a special position fixed within the record. Am I
    > > clear ?
    > >
    > > I thought to transfer to WORD with bookmarks fixed on a special
    > > position on the line but I don't find how to do that and I'm
    > > wondering if there is not another solution.

    >
    > You can save your file in CSV format.
    > This should work...
    >
    > Hoping to be helpful
    >
    > Regards
    >
    > --
    > Franz
    >
    > ----------------------------------------------------------------------------------------
    > To reply translate from italian InVento (no capital letters)
    > ----------------------------------------------------------------------------------------
    >
    >
    >


  5. #5
    Franz
    Guest

    Re: EXCEL VBA

    "VINCE" <[email protected]>ha scritto nel messaggio
    [email protected]

    > I've tried but it doesn't work. To be clear I give an example :
    >
    > Cell A1 = Account number (12 positions), cell A2 = Name (max 26
    > positions)
    >
    > I'd like to transfer it to a .doc or .txt as :
    >
    > line 1 position 4 to 15, account number and line 1 positions 16 to
    > 41, Name and the next data will come on position 42, whatever is the
    > lenght of the Name encoded in cell A2.


    Maybe you can try to use Data Validation to set the max lenght of each filed
    (cell) and then Save As and choose .txt.

    I think this should work... :-)

    Hoping to be helpful...

    Regards

    --
    Franz

    ----------------------------------------------------------------------------------------
    per rispondermi traduci InVento in inglese (no maiuscole)
    ----------------------------------------------------------------------------------------



+ 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