Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default 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

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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.

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I convert an excel file to a flat text file Lannutslp Excel Discussion (Misc queries) 1 June 3rd 05 10:17 AM
Convert excel file to flat text file Lannutslp Excel Discussion (Misc queries) 1 June 1st 05 03:48 AM
Convert excel file to flat text file Gary's Student Excel Discussion (Misc queries) 0 June 1st 05 12:17 AM
PDF to Excel as flat file, via macro CLR Excel Programming 10 February 17th 05 04:23 PM
Flat File Max Excel Discussion (Misc queries) 4 December 20th 04 03:33 PM


All times are GMT +1. The time now is 03:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"