PC Review


Reply
Thread Tools Rate Thread

Access Functions & Subprocedures in an Add-In

 
 
=?Utf-8?B?U2V0aCBTY2h3YXJt?=
Guest
Posts: n/a
 
      26th Oct 2006
I have written several functions and subprocedures in a spreadsheet file. I
saved the file as an .XLA and then loaded the add-in, but chose not to copy
it to my local add-ins folder.

I read somewhere if you want to have a macro run code you have written it
must be a subprocedure. So I did that. However, when I go to the Macro menu
or create macro menu the subprocedures are not available.

What's weird is - I can write formulas in any workbook I open and I can
reference the code I wrote as a function and the formulas work great. So why
can't I 'see' the subprocedures to run macros?

Any help is greatly appreciated.

Seth
 
Reply With Quote
 
 
 
 
Ken Puls
Guest
Posts: n/a
 
      27th Oct 2006
Actually, that is by design. Typically when you distribute an XLA, you
don't want users just running the macros unless they are supposed to.

I'd suggest that you may want to add a menu structure or toolbar to your
workbook, and John Walkenbach has some great examples of how to do that
here: http://j-walk.com/ss/excel/tips/commandbars.htm

Note that if you are using Excel 2007, and menus will show up in a
special section of the menu, as the user interface has been redesigned
to use the Ribbon, rather than commandbars.

HTH,

Ken Puls, CMA - Microsoft MVP (Excel)
www.excelguru.ca

Seth Schwarm wrote:
> I have written several functions and subprocedures in a spreadsheet file. I
> saved the file as an .XLA and then loaded the add-in, but chose not to copy
> it to my local add-ins folder.
>
> I read somewhere if you want to have a macro run code you have written it
> must be a subprocedure. So I did that. However, when I go to the Macro menu
> or create macro menu the subprocedures are not available.
>
> What's weird is - I can write formulas in any workbook I open and I can
> reference the code I wrote as a function and the formulas work great. So why
> can't I 'see' the subprocedures to run macros?
>
> Any help is greatly appreciated.
>
> Seth

 
Reply With Quote
 
=?Utf-8?B?U2V0aCBTY2h3YXJt?=
Guest
Posts: n/a
 
      27th Oct 2006
Thank you. I have briefly read through the suggested link and this is a far
better answer to my question than I could have hoped for.

Seth

"Ken Puls" wrote:

> Actually, that is by design. Typically when you distribute an XLA, you
> don't want users just running the macros unless they are supposed to.
>
> I'd suggest that you may want to add a menu structure or toolbar to your
> workbook, and John Walkenbach has some great examples of how to do that
> here: http://j-walk.com/ss/excel/tips/commandbars.htm
>
> Note that if you are using Excel 2007, and menus will show up in a
> special section of the menu, as the user interface has been redesigned
> to use the Ribbon, rather than commandbars.
>
> HTH,
>
> Ken Puls, CMA - Microsoft MVP (Excel)
> www.excelguru.ca
>
> Seth Schwarm wrote:
> > I have written several functions and subprocedures in a spreadsheet file. I
> > saved the file as an .XLA and then loaded the add-in, but chose not to copy
> > it to my local add-ins folder.
> >
> > I read somewhere if you want to have a macro run code you have written it
> > must be a subprocedure. So I did that. However, when I go to the Macro menu
> > or create macro menu the subprocedures are not available.
> >
> > What's weird is - I can write formulas in any workbook I open and I can
> > reference the code I wrote as a function and the formulas work great. So why
> > can't I 'see' the subprocedures to run macros?
> >
> > Any help is greatly appreciated.
> >
> > Seth

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2003 treats embedded functions in nested queries as a reference rather than a value - Access 2007? jgfaughnan Microsoft Access Queries 2 9th Jun 2007 08:16 PM
Calling Subprocedures craig via DotNetMonster.com Microsoft VB .NET 2 22nd Sep 2006 03:32 AM
Converting Oracle SQL functions to Access built-in functions GVR_Mike Microsoft Access 3 30th Jun 2006 12:33 AM
Referencing A Subprocedures Name (Re-post) Bryn Microsoft Excel Programming 2 3rd Mar 2004 12:38 PM
Referencing a Subprocedures Name Microsoft Excel Programming 2 25th Feb 2004 09:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:35 PM.