View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
FJ FJ is offline
external usenet poster
 
Posts: 90
Default Help with Excel Add-in

Hi, Peter, no, I'm not using any spacs or punctuation. Actually, I've tried
it so many times that I finally just started using one word names to make it
easier.

I've tried to create the add-in both by starting with an xls file and then
saving it as an xla as well as just trying to just save it right from the
start as an xla, but I can't get it to work either way. It always seems to
be looking for an xls file in order to run. Do I have to save an xls file in
the add-in folder also?




"Peter T" wrote:

Things to check -
Below, twice you refer to file with an xls extension, presumably if it's an
addin (subject line) the extension would be '.xla'. Perhaps it was 'xls'
until you converted it to an addin.

Does your filename include any spaces or punctuation, if so you'll need to
embrace it with apostrophes, try doing that anyway, won't do any harm.

'my addin.xla'!myMacro

Do you have any duplicate named macros, try renaming your macro as something
certain to be unique.

Check out Dave Peterson's post.

Regards,
Peter T

"FJ" wrote in message
...
Hi, Peter. The problem is, I can't get it to work from a custom button,
either. I click on the button and it gives me a message like, "The macro
'Book1.xls!Name of Macro' cannot be found".

As I said to Bob, I'm just very confused about all this and I'm probably
doing something very wrong on a very basic level. I also don't really
understand why it keeps telling me that a .xls file can't be found. I
thought the point of an add-in was that once you had it loaded, the macros

in
it would be available to other workbooks. Or does it always have to be
associated with a regular .xls workbook on each computer where you want to
use the macros in that add-in?

Sorry if this is a really basic question. All this is very new to me.




"Peter T" wrote:

"FJ" wrote in message

Hi, Bob, thanks for your response. Actually, the thing is that when I
open a
new workbook and go into the VBE, I can see the macro code, but I

can't
see
the macros listed when I go to dialog box under Tools, Macro, Macros

on
the
worksheet itself. Shouldn't they be listed in that dialog box if the
add-in
is loaded correctly?

Macros in addins are not listed in the macros dialog, they are typically
activated from a custom menu button that you have added.

To get you started you can add a button manually with Customize menus,

try
the smiley face listed under 'macros'. Place it where you want and

assign
your macro. Later though you will probably want to add and remove your
custom menu buttons programmatically.

Regards,
Peter T