Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Auto_Open & Add in

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MSweetG222 - 23 Mar 2006 16:29 GMT
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
Jim Thomlinson - 23 Mar 2006 17:10 GMT
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.
Signature

HTH...

Jim Thomlinson

> All,
>
[quoted text clipped - 23 lines]
> Thank you for your help...
> MSweetG222
MSweetG222 - 23 Mar 2006 23:00 GMT
Thank you!  Speed is always important to me.  I will change to your suggestion.

Thx again.
MSweetG222

> 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
[quoted text clipped - 30 lines]
> > Thank you for your help...
> > MSweetG222
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.