Sub add-ain

  • Thread starter Thread starter Arne Hegefors
  • Start date Start date
A

Arne Hegefors

Hi! I have a very easy sub that I use for deleting blank spaces between
thousand numbers (ie 1 000 000 becomes 1000000). I use this sub for many
workbooks. I have reated an add-in that contains this sub and loaded it. But
I dont know how to run the sub. Usually I just press alt + F8 and I get the
list of macros avaliable. but this does not come up even if i loaded the
add-in. My question is is add-ins just for functions or how can I run my sub?
I know you can do it by automaically launching the sub when a workbook is
opened but that wont do t for me (sine I paste data to the worksheet and then
I have to run the sub). Please help me solve this. Thanks alot!
 
Arne,

If it is a function in the add-in, you should be able to call it directly,
like

=MySpaceRemover(A1)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Hi! Thanks for your answer. However it is not a function but a sub. Does it
only work for for functions? Thanks!

"Bob Phillips" skrev:
 
thanks for the help. Putting"Personal.xls!" i front of the function didn't
work - wish that it had. however, i saved the workbook, re-opened it and the
regular, ie. without the prefix "Personal.xls" functions worked. i notice
that when i opened another workbook where this function worked, you initially
see the NAME? error but after the hourglass disappears, so too do the errors.
any idea why this happens?
 
No, but in VBA you need to Application..Run it

Application.Run "YourAddin.xla!DSubName"

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top