+ Reply to Thread
Results 1 to 3 of 3

How to embed a macro in a flat file?

  1. #1
    calworld@gmail.com
    Guest

    How to embed a macro in a flat file?

    I am creating a tab delimited file in UNIX environment. User use Excel
    to view it. I need to run a macro so it will display correct page
    break. However, I don't know how to embed the macro so the user will be
    prompted to run the macro. Is there anyone that has an insight on how
    to do it?
    Thank you
    -Cal


  2. #2
    halimnurikhwan@yahoo.com
    Guest

    Re: How to embed a macro in a flat file?

    hi,

    record a macro by --- Tools > Macro > Record New Macro >
    then press Alt + F11 then you'll in VBA session

    I think you need to split the UNIX file into cells in excel ?!

    rgds,

    Halim

    calwo...@gmail.com menuliskan:
    > I am creating a tab delimited file in UNIX environment. User use Excel
    > to view it. I need to run a macro so it will display correct page
    > break. However, I don't know how to embed the macro so the user will be
    > prompted to run the macro. Is there anyone that has an insight on how
    > to do it?
    > Thank you
    > -Cal



  3. #3
    Dave Peterson
    Guest

    Re: How to embed a macro in a flat file?

    If you're creating a tab delimited text file (in any environment), then that
    file will contain plain old text--no macros, no formulas, no formatting.

    What I like to do is create a workbook that has a macro in it. It has one sheet
    with a giant button on it that has has a macro assigned to it.

    The macro prompts the user for the name of the file (if it can change) and then
    imports that selected file.

    In fact, the macro can continue doing nice things--freeze panes, filters,
    headings, page headers and footers, save to a nice location with a nice name...

    Most of this code can be obtained by recording a macro when you do it manually.
    Then the minor modification to ask for the filename.

    Then you send the user the macro workbook and they store it locally (or put it
    somewhere everyone can get to--like a network drive).

    And when you update your text file, you just tell them to use the macro workbook
    to import the text file.

    calworld@gmail.com wrote:
    >
    > I am creating a tab delimited file in UNIX environment. User use Excel
    > to view it. I need to run a macro so it will display correct page
    > break. However, I don't know how to embed the macro so the user will be
    > prompted to run the macro. Is there anyone that has an insight on how
    > to do it?
    > Thank you
    > -Cal


    --

    Dave Peterson

+ 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