Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 287
Default Installed Addin file opens when it shouldn't

I have created a .xls file with a small macro and a toolbar to access the
macro.
I have saved the file as .xla then installed as an Addin.

When I run the macro I get the standard 'enable/disable macro' message,
however it indicates that the file the macro is in is the orginal .xls file,
not the .xla. When run, the .xls file also opens.
With a saved and installed Addin, why would this happen? Should Addin files
never show their worksheet or open in this manner?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Installed Addin file opens when it shouldn't

Add-ins will not generate the macros warning since it is assumed they are safe
because you chose to install them.

Your warning is probably coming from the workbook.xls that is also opening.

The Toolbar button macro assignments probably still point to the original
workbook.xls

Clean out the references to the original.

With the Add-in installed.............

ToolsCustomize and right-click on one of the toolbar buttons and "assign macro"

You will see workbook.xls!macroname

Remove any reference to the original workbook.and leave just the macro name.

Each button will have to be re-assigned.

Play with it until you get it.


Gord Dibben MS Excel MVP

On Mon, 4 Feb 2008 17:21:00 -0800, Aaron
wrote:

I have created a .xls file with a small macro and a toolbar to access the
macro.
I have saved the file as .xla then installed as an Addin.

When I run the macro I get the standard 'enable/disable macro' message,
however it indicates that the file the macro is in is the orginal .xls file,
not the .xla. When run, the .xls file also opens.
With a saved and installed Addin, why would this happen? Should Addin files
never show their worksheet or open in this manner?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 287
Default Installed Addin file opens when it shouldn't

Thanks Gord,

I can amend the button macro assigment after installing the Add-in, however
what I'm needing to do is create an Add-in with it's macros assigned to
custom toolbar buttons and distribute to other users. I'm hoping that they
should be able to just install the Add-in and not have to modify the button's
macro assignment after the installation.
I have code in the Add-in workbook that makes the custom toolbar visible
when installed and not visible when removed. The problem seems to be that
after creating the application as an .xls file then saving as an .xla file,
the button macro assignments don't follow suit and still point to the
original .xls file.
Is there a way to assign the button macros during design as an .xls file so
that they reference internally to the installed .xla file so the buttons
don't have to be modified after the Add-in is installed?


"Gord Dibben" wrote:

Add-ins will not generate the macros warning since it is assumed they are safe
because you chose to install them.

Your warning is probably coming from the workbook.xls that is also opening.

The Toolbar button macro assignments probably still point to the original
workbook.xls

Clean out the references to the original.

With the Add-in installed.............

ToolsCustomize and right-click on one of the toolbar buttons and "assign macro"

You will see workbook.xls!macroname

Remove any reference to the original workbook.and leave just the macro name.

Each button will have to be re-assigned.

Play with it until you get it.


Gord Dibben MS Excel MVP

On Mon, 4 Feb 2008 17:21:00 -0800, Aaron
wrote:

I have created a .xls file with a small macro and a toolbar to access the
macro.
I have saved the file as .xla then installed as an Addin.

When I run the macro I get the standard 'enable/disable macro' message,
however it indicates that the file the macro is in is the orginal .xls file,
not the .xla. When run, the .xls file also opens.
With a saved and installed Addin, why would this happen? Should Addin files
never show their worksheet or open in this manner?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Installed Addin file opens when it shouldn't

Toolbar and menu changes are saved in your Excelxx.xlb file which you would have
to copy to other users' computers and overwrite theirs.

NOT a good idea and should not be considered.

You can attach a Toolbar to a workbook by ToolsCustomizeToolbarsAttach.

You would have to do this in your workbook.xls before you save as an add-in.

By far the best and most stable method is to create the Toolbar when your add-in
opens and delete the Toolbar when it closes. This way, there is never any doubt
to which path the macros need.

They always point to the add-in only.

For code see Debra Dalgleish's site on creating Toolbars "on the fly"
for an add-in

http://www.contextures.on.ca/xlToolbar02.html


Gord

On Tue, 5 Feb 2008 17:30:00 -0800, Aaron
wrote:

Thanks Gord,

I can amend the button macro assigment after installing the Add-in, however
what I'm needing to do is create an Add-in with it's macros assigned to
custom toolbar buttons and distribute to other users. I'm hoping that they
should be able to just install the Add-in and not have to modify the button's
macro assignment after the installation.
I have code in the Add-in workbook that makes the custom toolbar visible
when installed and not visible when removed. The problem seems to be that
after creating the application as an .xls file then saving as an .xla file,
the button macro assignments don't follow suit and still point to the
original .xls file.
Is there a way to assign the button macros during design as an .xls file so
that they reference internally to the installed .xla file so the buttons
don't have to be modified after the Add-in is installed?


"Gord Dibben" wrote:

Add-ins will not generate the macros warning since it is assumed they are safe
because you chose to install them.

Your warning is probably coming from the workbook.xls that is also opening.

The Toolbar button macro assignments probably still point to the original
workbook.xls

Clean out the references to the original.

With the Add-in installed.............

ToolsCustomize and right-click on one of the toolbar buttons and "assign macro"

You will see workbook.xls!macroname

Remove any reference to the original workbook.and leave just the macro name.

Each button will have to be re-assigned.

Play with it until you get it.


Gord Dibben MS Excel MVP

On Mon, 4 Feb 2008 17:21:00 -0800, Aaron
wrote:

I have created a .xls file with a small macro and a toolbar to access the
macro.
I have saved the file as .xla then installed as an Addin.

When I run the macro I get the standard 'enable/disable macro' message,
however it indicates that the file the macro is in is the orginal .xls file,
not the .xla. When run, the .xls file also opens.
With a saved and installed Addin, why would this happen? Should Addin files
never show their worksheet or open in this manner?




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
Cannot open File on newly installed Excel 2007 Thank you. Terri Excel Discussion (Misc queries) 1 December 6th 07 09:49 PM
How I know if a file is using a custom addin Rodrigo Ferreira Excel Discussion (Misc queries) 3 September 15th 06 02:44 PM
How I know if a file is using a custom addin Rodrigo Ferreira Excel Worksheet Functions 1 September 15th 06 02:08 AM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM


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