ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sub add-ain (https://www.excelbanter.com/excel-programming/402347-sub-add-ain.html)

Arne Hegefors

Sub add-ain
 
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!

Bob Phillips

Sub add-ain
 
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)

"Arne Hegefors" wrote in message
...
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 Hegefors

Sub add-ain
 
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:

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)

"Arne Hegefors" wrote in message
...
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!





april

Sub add-ain
 
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?
--
aprilshowers


"Arne Hegefors" wrote:

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!


Bob Phillips

Sub add-ain
 
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)

"Arne Hegefors" wrote in message
...
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:

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)

"Arne Hegefors" wrote in message
...
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!








All times are GMT +1. The time now is 09:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com