Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatic importing of a macro

Hi,

I have been doing some work in UNIX. The results come out as a larg
.csv text file (delimited by a comma).

To look at the results I like to import it into EXCEL. When I get int
Excel I have to format the report alot so I craeted a macro which I ca
run each time. Still no problem.

Because the csv file changes regularly this means the macro has t
change so I decided to create the macro's visual basic command
automatically whilst doing my work in UNIX and store them in a tex
file (macrofile.txt).

Everythings still going well and now I can manually open the .csv i
EXCEL and manually import the macrofile.txt into the Visual Basi
editor and then run it. Thats great manually.

So my question is how can I automate the openning of the .csv with th
macrofile.txt and then run the macrofile? (Tried recording my action
of imprting the macro but it does not work - as you can see I'm prett
new to this).

Please please help.

Ni

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Automatic importing of a macro

You seem to have a CSV file; if your use extension CSV instead of TXT in your file name, you can open the file using File ! Open in Excel WITHOUT any macros

Your CSV file must comply: it must have 1<=rows<=65536 and 1<=cols<=256; anything outside these limits will be discarded

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatic importing of a macro

Nik
I am also doing something like this and much more. However I have been able to do what you want. I am stuck with writing the output file. Anyway this is what you need to do if you need to automate your macr

1. Invoke exce
2. go to tools and macro and Record macro (Give a name to macro
3. Now open your csv file (note your macro is still recording)
4. Do whatever formatting you are want to do
5. Stop recordin
6. Clear all the data and undo all formatting you have and come back to the blank worksheet mode that you first opene
7. Do a file save as and coose template for file typ
8. Note that you have a .xlt file in excel's templates folder which you can reach each time you open excel and click on new
9. Now if you want to fully automate this then the name of the macro should be Auto_Open so that when clik on the .xlt file it starts the macr

Hope that help


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatic importing of a macro

Thanks for the last reply.

the trouble is my macro actions change from file to file so I canno
have a single set of constant actions.

I need to import the specific Macro actions for each file but I cann
oseem to automate that impor

--
Message posted from http://www.ExcelForum.com

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
Need to stop automatic column re-sizing when importing XML data Brian Beckers Excel Discussion (Misc queries) 0 January 8th 10 05:55 PM
Problem importing external data / Automatic publishing webpage Bruno Excel Discussion (Misc queries) 0 October 29th 09 03:54 PM
Importing data via macro Liz New Users to Excel 1 April 23rd 07 09:44 PM
importing data using a macro chris_rip Excel Discussion (Misc queries) 0 July 18th 05 08:42 PM
importing data using a macro Jo[_5_] Excel Programming 1 August 20th 03 01:08 PM


All times are GMT +1. The time now is 03:03 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"