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

All,

I had a workbook with an Auto_Open procedure in it that looked for selected
information within the workbook (like a sheet named "StartUp"). If found,
then the Auto_Open procedure would run.

I have since separated my workbook into 2 workbooks: 1) an Add-in and 2) a
Data Workbook w/ the "StartUp" worksheet info. (I plan on have several Data
Workbooks & I didn't want to maintain the code in several workbooks).

What do I need to do to the Add-in or the Data Workbook(s) that contains the
"StartUp" worksheet(s) to get the Auto_Open procedure in the Add-in to fire
when I open the Data Workbook?

I currently have an Auto_Open procedure in the Data Worksheet that calls the
Auto_Open procedure in the Add-in. This works, but I am not sure that this
is the proper way to code it.

In the Data Workbooks:
Sub Auto_Open
Application.Run "MyAddin!Auto_Open"
End Sub

Does anyone know the correct way to code this?

Thank you for your help...
MSweetG222

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Auto_Open & Add in

There is nothing wrong with what you are doing, except that it is slow. If
you need an efficiencly gain then you could create a reference to the addin
in your spreadsheet. Click on Tools - References - Find the Addin. If you
have not renamed the addin project it will just come up as project. You may
want to go into the Addin and change it's Name in the properties window. This
gives you a direct link to the addin and will improve the performance.
--
HTH...

Jim Thomlinson


"MSweetG222" wrote:

All,

I had a workbook with an Auto_Open procedure in it that looked for selected
information within the workbook (like a sheet named "StartUp"). If found,
then the Auto_Open procedure would run.

I have since separated my workbook into 2 workbooks: 1) an Add-in and 2) a
Data Workbook w/ the "StartUp" worksheet info. (I plan on have several Data
Workbooks & I didn't want to maintain the code in several workbooks).

What do I need to do to the Add-in or the Data Workbook(s) that contains the
"StartUp" worksheet(s) to get the Auto_Open procedure in the Add-in to fire
when I open the Data Workbook?

I currently have an Auto_Open procedure in the Data Worksheet that calls the
Auto_Open procedure in the Add-in. This works, but I am not sure that this
is the proper way to code it.

In the Data Workbooks:
Sub Auto_Open
Application.Run "MyAddin!Auto_Open"
End Sub

Does anyone know the correct way to code this?

Thank you for your help...
MSweetG222

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Auto_Open & Add in

Thank you! Speed is always important to me. I will change to your suggestion.

Thx again.
MSweetG222



"Jim Thomlinson" wrote:

There is nothing wrong with what you are doing, except that it is slow. If
you need an efficiencly gain then you could create a reference to the addin
in your spreadsheet. Click on Tools - References - Find the Addin. If you
have not renamed the addin project it will just come up as project. You may
want to go into the Addin and change it's Name in the properties window. This
gives you a direct link to the addin and will improve the performance.
--
HTH...

Jim Thomlinson


"MSweetG222" wrote:

All,

I had a workbook with an Auto_Open procedure in it that looked for selected
information within the workbook (like a sheet named "StartUp"). If found,
then the Auto_Open procedure would run.

I have since separated my workbook into 2 workbooks: 1) an Add-in and 2) a
Data Workbook w/ the "StartUp" worksheet info. (I plan on have several Data
Workbooks & I didn't want to maintain the code in several workbooks).

What do I need to do to the Add-in or the Data Workbook(s) that contains the
"StartUp" worksheet(s) to get the Auto_Open procedure in the Add-in to fire
when I open the Data Workbook?

I currently have an Auto_Open procedure in the Data Worksheet that calls the
Auto_Open procedure in the Add-in. This works, but I am not sure that this
is the proper way to code it.

In the Data Workbooks:
Sub Auto_Open
Application.Run "MyAddin!Auto_Open"
End Sub

Does anyone know the correct way to code this?

Thank you for your help...
MSweetG222

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
AUTO_OPEN Bob Barnes Excel Discussion (Misc queries) 2 February 6th 08 03:03 AM
Auto_open and more.... pcor New Users to Excel 2 December 1st 06 02:07 AM
Auto_open and more.... Mike New Users to Excel 0 November 30th 06 07:13 PM
auto_open? Jack Sons Excel Discussion (Misc queries) 0 February 22nd 05 09:16 PM
XLA auto_open jc Excel Programming 0 October 6th 04 12:50 AM


All times are GMT +1. The time now is 07:00 AM.

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"