Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default AutoOpen in excel?

Hi,

I want my macro to start automatically when I create a new document based on
a template. In Word I normally use AutoOpen() and AutoNew(). Are there
similar functions in Excel that do the same thing?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default AutoOpen in excel?

Store a subprocedure called Auto_Open in Personal.xls.

If you have not created any macros, you may not have a personal macro
workbook already created and residing in Excel's startup folder. If this is
the case, the best way I have found to get one generated is to turn on the
macro recorder, designate the Personal Macro Workbook as the place the macro
should be stored, click around a bit, turn off the recorder, and go to the
VB editor to look for the project in Personal.xls. There will be a "Module1"
module by this time and some code indicating your recent clicking/cell
selecting. You can get rid of the macro you created, and use this module
space to yupe a new macro. Such as ...

Sub Auto_Open
'put more VBA code here
End sub

good luck...

Bill
"bilisa" wrote in message
...
Hi,

I want my macro to start automatically when I create a new document based
on
a template. In Word I normally use AutoOpen() and AutoNew(). Are there
similar functions in Excel that do the same thing?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default AutoOpen in excel?

If it is a specific template, in that template, use the workbook.open event

http://www.cpearson.com/excel/events.htm

if you mean everytime a workbook is created, regardless of the template
used, the you would need to instantiate application level events where there
is an event for trapping the creation of new workbooks

http://www.cpearson.com/excel/appevent.htm

which should get you started.

these links are to Chip Pearson's site.

--
Regards,
Tom Ogilvy


"bilisa" wrote in message
...
Hi,

I want my macro to start automatically when I create a new document based

on
a template. In Word I normally use AutoOpen() and AutoNew(). Are there
similar functions in Excel that do the same thing?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default AutoOpen in excel?

a much better response, I didn't read the question thoroughly...


"Tom Ogilvy" wrote in message
...
If it is a specific template, in that template, use the workbook.open
event

http://www.cpearson.com/excel/events.htm

if you mean everytime a workbook is created, regardless of the template
used, the you would need to instantiate application level events where
there
is an event for trapping the creation of new workbooks

http://www.cpearson.com/excel/appevent.htm

which should get you started.

these links are to Chip Pearson's site.

--
Regards,
Tom Ogilvy


"bilisa" wrote in message
...
Hi,

I want my macro to start automatically when I create a new document based

on
a template. In Word I normally use AutoOpen() and AutoNew(). Are there
similar functions in Excel that do the same thing?





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
AutoOpen Tom Renoe Excel Programming 2 November 21st 04 03:47 PM
How to disable autoopen() programmatically Karl Steinam Excel Programming 2 September 30th 04 06:35 PM
'Yes' 'No' button on autoopen macro Larry Excel Programming 2 May 21st 04 09:59 PM
Disable AutoOpen macro's Michael Beckinsale Excel Programming 1 October 16th 03 01:48 PM


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