Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Custom Add-In?

I've created a new workbook with some VBA functionality
and a custom toolbar to call the functions. I have saved
it as a .XLA and referenced it in the addins... My
problem is that when I open up a new workbook and click
on the custom button the source code for the .xla is
opened instead of the .xla itself. What I want is to
have the toolbar opened when the add-in is referenced and
have the code run from within the .xla. How do I
accomplish this? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Custom Add-In?

I'm kind of confused when you write that the source code opened for the .xla.

Source code is in the workbook (that was saved in the .xla).

Do you mean it opens a different workbook? If yes, maybe you assigned the
controls on the toolbar to point at the wrong workbook?



Phill wrote:

I've created a new workbook with some VBA functionality
and a custom toolbar to call the functions. I have saved
it as a .XLA and referenced it in the addins... My
problem is that when I open up a new workbook and click
on the custom button the source code for the .xla is
opened instead of the .xla itself. What I want is to
have the toolbar opened when the add-in is referenced and
have the code run from within the .xla. How do I
accomplish this? Thanks.


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Custom Add-In?

have the workbook.Open event of the XLA loop through the controls of the
toolbar and assign the onaction property to point to the xla.

object.OnAction = thisworkbook.name & "!" & varr(i)

where varr(i) contains the appropriate macro name.

Or do this one time with external code. (replace thisworkbook.name with the
name of the xla).



--
Regards,
Tom Ogilvy

Phill wrote in message
...
I've created a new workbook with some VBA functionality
and a custom toolbar to call the functions. I have saved
it as a .XLA and referenced it in the addins... My
problem is that when I open up a new workbook and click
on the custom button the source code for the .xla is
opened instead of the .xla itself. What I want is to
have the toolbar opened when the add-in is referenced and
have the code run from within the .xla. How do I
accomplish this? Thanks.



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
custom field with custom formula in pivot table! Sedaghat Nejad Excel Worksheet Functions 2 June 21st 09 11:19 AM
Format Cell as custom type but data doesn't display like I custom. ToMMie Excel Discussion (Misc queries) 6 September 11th 08 08:31 AM
2003 - 2007 custom macro and custom button restore. Scott Sornberger Excel Discussion (Misc queries) 11 May 23rd 08 02:41 PM
Adding custom list and text boxes to the custom tool bar from Excel C API Mousam Excel Discussion (Misc queries) 0 August 7th 07 09:19 AM
Can you link a custom property to an Excel custom header text? LouErc Setting up and Configuration of Excel 0 November 8th 05 04:58 PM


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