Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how to make a macro and run in every excel book that opened?

Hi,
I make a macro and assigned that macro to customized menu bar.
Seems that macro doesnt run in other book.

Somebody know how to make a macro and run in every excel book that opened?
Or the reference/article to do so?

Thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default how to make a macro and run in every excel book that opened?

save the code in Personal.xls or in an xla that is saved in the lstart
folder. it will open when excel does, and the code will be available to all
workbooks

"wayan" wrote:

Hi,
I make a macro and assigned that macro to customized menu bar.
Seems that macro doesnt run in other book.

Somebody know how to make a macro and run in every excel book that opened?
Or the reference/article to do so?

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how to make a macro and run in every excel book that opened?

Hi Patrick,

I tried to save as in .xla extension and tick the Wayan analysis in
toolAdd-Ins but the messages 'book4.xls' could not be found.etc....etc....etc

where is the lstart located?

"Patrick Molloy" wrote:

save the code in Personal.xls or in an xla that is saved in the lstart
folder. it will open when excel does, and the code will be available to all
workbooks

"wayan" wrote:

Hi,
I make a macro and assigned that macro to customized menu bar.
Seems that macro doesnt run in other book.

Somebody know how to make a macro and run in every excel book that opened?
Or the reference/article to do so?

Thanks in advance

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default how to make a macro and run in every excel book that opened?

Patrick means xlstart iso lstart. It is the defaulft folder for excel to
open all workbooks contained there.
Look also in tool/options, general tab.
For the others part of your question, remeber that your macro will execute
on the active workbook, which is also the last opened oen, except if you
activate another one manually or by code. To overcome this, yuou should
specify on which workbook you macro will apply (as your code is not in your
post, I presume that it is the explanation.

Sub test
Dim x as integer
Dim wb as Workbook
for each wb in application.Workbooks
wb.Worksheets( ???).range("A1")= ???
or
Worksheets( ???).activate
wb.activate
range("A1)= ....
next wb

Regards

Jean-Yves

"wayan" wrote in message
...
Hi Patrick,

I tried to save as in .xla extension and tick the Wayan analysis in
toolAdd-Ins but the messages 'book4.xls' could not be

found.etc....etc....etc

where is the lstart located?

"Patrick Molloy" wrote:

save the code in Personal.xls or in an xla that is saved in the lstart
folder. it will open when excel does, and the code will be available to

all
workbooks

"wayan" wrote:

Hi,
I make a macro and assigned that macro to customized menu bar.
Seems that macro doesn't run in other book.

Somebody know how to make a macro and run in every excel book that

opened?
Or the reference/article to do so?

Thanks in advance



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
EXCEL WORK BOOK DUPLICATES WHEN OPENED Asoka Walpitagama - Brandix College IT Excel Discussion (Misc queries) 1 November 18th 09 02:25 PM
Auto sort when worksheet/book opened Lise Excel Discussion (Misc queries) 4 October 26th 08 12:35 AM
How to make up an excel book that I can import other programs in jumlor Excel Worksheet Functions 1 August 5th 08 08:44 PM
make excel files with same names to be opened at one time Andrey Kiselyov Excel Discussion (Misc queries) 0 August 4th 05 10:45 AM
Excel macro error when opened in internet browser Dee Excel Programming 0 April 19th 04 11:16 PM


All times are GMT +1. The time now is 10:19 PM.

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

About Us

"It's about Microsoft Excel"