PC Review


Reply
Thread Tools Rate Thread

Creating an addin

 
 
streamaxi@gmail.com
Guest
Posts: n/a
 
      8th Nov 2006
I have created a Private Function which accepts 9 parameters from the
user. I don't want to show this function to anybody. How can I create a
password protected addin out of this function so that users can install
that addin and use this function only by supplying the parameters
without having access to the vba code.

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      8th Nov 2006


http://support.microsoft.com/default.aspx?kbid=211563
How to create an add-in file in Excel 2000

http://msdn.microsoft.com/library/de...ificaddins.asp
Building Application Specific Add-Ins

http://msdn.microsoft.com/library/de...xceladdins.asp
Excel Add-Ins

http://msdn.microsoft.com/library/de...slibraries.asp
Add-ins, Templates, Wizards, and Libraries


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have created a Private Function which accepts 9 parameters from the
> user. I don't want to show this function to anybody. How can I create a
> password protected addin out of this function so that users can install
> that addin and use this function only by supplying the parameters
> without having access to the vba code.
>



 
Reply With Quote
 
streamaxi@gmail.com
Guest
Posts: n/a
 
      8th Nov 2006
Thank you Bob, I read the articles and this is what I did:

I compiled the project on the Debug menu in the Visual Basic Editor.
Password protected the project
Saved the file with .xla extention.

then:

I opened a blank workbook and imported the addin that I created
I wrote a small vba code which calls the function that I createdin the
addin but I get this error:

Compile error:
Sub or Function not defined

Bob Phillips wrote:
> http://support.microsoft.com/default.aspx?kbid=211563
> How to create an add-in file in Excel 2000
>
> http://msdn.microsoft.com/library/de...ificaddins.asp
> Building Application Specific Add-Ins
>
> http://msdn.microsoft.com/library/de...xceladdins.asp
> Excel Add-Ins
>
> http://msdn.microsoft.com/library/de...slibraries.asp
> Add-ins, Templates, Wizards, and Libraries
>
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have created a Private Function which accepts 9 parameters from the
> > user. I don't want to show this function to anybody. How can I create a
> > password protected addin out of this function so that users can install
> > that addin and use this function only by supplying the parameters
> > without having access to the vba code.
> >


 
Reply With Quote
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      8th Nov 2006
Define "Imported the Addin". To directly call the Sub or function in the
addin you need to either create a reference to the addin (Tools -> References
-> Find the project in the references list. It helps to rename the VBA
project in order to find it.) or run the sub

Application.Run "MyAddin.xla!MySub"
--
HTH...

Jim Thomlinson


"(E-Mail Removed)" wrote:

> Thank you Bob, I read the articles and this is what I did:
>
> I compiled the project on the Debug menu in the Visual Basic Editor.
> Password protected the project
> Saved the file with .xla extention.
>
> then:
>
> I opened a blank workbook and imported the addin that I created
> I wrote a small vba code which calls the function that I createdin the
> addin but I get this error:
>
> Compile error:
> Sub or Function not defined
>
> Bob Phillips wrote:
> > http://support.microsoft.com/default.aspx?kbid=211563
> > How to create an add-in file in Excel 2000
> >
> > http://msdn.microsoft.com/library/de...ificaddins.asp
> > Building Application Specific Add-Ins
> >
> > http://msdn.microsoft.com/library/de...xceladdins.asp
> > Excel Add-Ins
> >
> > http://msdn.microsoft.com/library/de...slibraries.asp
> > Add-ins, Templates, Wizards, and Libraries
> >
> >
> > --
> > HTH
> >
> > Bob Phillips
> >
> > (replace somewhere in email address with gmail if mailing direct)
> >
> > <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I have created a Private Function which accepts 9 parameters from the
> > > user. I don't want to show this function to anybody. How can I create a
> > > password protected addin out of this function so that users can install
> > > that addin and use this function only by supplying the parameters
> > > without having access to the vba code.
> > >

>
>

 
Reply With Quote
 
streamaxi@gmail.com
Guest
Posts: n/a
 
      8th Nov 2006
Thanks,

Jim Thomlinson wrote:
> Define "Imported the Addin".


I meant clicking Tools->Addins and putting a check mark on the addin
that I created.

> or run the sub
>
> Application.Run "MyAddin.xla!MySub"


I am still struggling with the same. How should be the syntax if the
function that I am calling requires parameters?

I tried Application.Run "Extractor.xla!GetReport('parameter1',
parameter2, 'parameter3')" but it did not work.


To directly call the Sub or function in the
> addin you need to either create a reference to the addin (Tools -> References
> -> Find the project in the references list. It helps to rename the VBA
> project in order to find it.) or run the sub
>
> Application.Run "MyAddin.xla!MySub"
> --
> HTH...
>
> Jim Thomlinson
>
>
> "(E-Mail Removed)" wrote:
>
> > Thank you Bob, I read the articles and this is what I did:
> >
> > I compiled the project on the Debug menu in the Visual Basic Editor.
> > Password protected the project
> > Saved the file with .xla extention.
> >
> > then:
> >
> > I opened a blank workbook and imported the addin that I created
> > I wrote a small vba code which calls the function that I createdin the
> > addin but I get this error:
> >
> > Compile error:
> > Sub or Function not defined
> >
> > Bob Phillips wrote:
> > > http://support.microsoft.com/default.aspx?kbid=211563
> > > How to create an add-in file in Excel 2000
> > >
> > > http://msdn.microsoft.com/library/de...ificaddins.asp
> > > Building Application Specific Add-Ins
> > >
> > > http://msdn.microsoft.com/library/de...xceladdins.asp
> > > Excel Add-Ins
> > >
> > > http://msdn.microsoft.com/library/de...slibraries.asp
> > > Add-ins, Templates, Wizards, and Libraries
> > >
> > >
> > > --
> > > HTH
> > >
> > > Bob Phillips
> > >
> > > (replace somewhere in email address with gmail if mailing direct)
> > >
> > > <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > I have created a Private Function which accepts 9 parameters from the
> > > > user. I don't want to show this function to anybody. How can I create a
> > > > password protected addin out of this function so that users can install
> > > > that addin and use this function only by supplying the parameters
> > > > without having access to the vba code.
> > > >

> >
> >


 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      8th Nov 2006
Application.Run "Extractor.xla!GetReport", "parameter1", "parameter2",
"parameter3"

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks,
>
> Jim Thomlinson wrote:
> > Define "Imported the Addin".

>
> I meant clicking Tools->Addins and putting a check mark on the addin
> that I created.
>
> > or run the sub
> >
> > Application.Run "MyAddin.xla!MySub"

>
> I am still struggling with the same. How should be the syntax if the
> function that I am calling requires parameters?
>
> I tried Application.Run "Extractor.xla!GetReport('parameter1',
> parameter2, 'parameter3')" but it did not work.
>
>
> To directly call the Sub or function in the
> > addin you need to either create a reference to the addin (Tools ->

References
> > -> Find the project in the references list. It helps to rename the VBA
> > project in order to find it.) or run the sub
> >
> > Application.Run "MyAddin.xla!MySub"
> > --
> > HTH...
> >
> > Jim Thomlinson
> >
> >
> > "(E-Mail Removed)" wrote:
> >
> > > Thank you Bob, I read the articles and this is what I did:
> > >
> > > I compiled the project on the Debug menu in the Visual Basic Editor.
> > > Password protected the project
> > > Saved the file with .xla extention.
> > >
> > > then:
> > >
> > > I opened a blank workbook and imported the addin that I created
> > > I wrote a small vba code which calls the function that I createdin the
> > > addin but I get this error:
> > >
> > > Compile error:
> > > Sub or Function not defined
> > >
> > > Bob Phillips wrote:
> > > > http://support.microsoft.com/default.aspx?kbid=211563
> > > > How to create an add-in file in Excel 2000
> > > >
> > > >

http://msdn.microsoft.com/library/de...ificaddins.asp
> > > > Building Application Specific Add-Ins
> > > >
> > > >

http://msdn.microsoft.com/library/de...xceladdins.asp
> > > > Excel Add-Ins
> > > >
> > > >

http://msdn.microsoft.com/library/de...slibraries.asp
> > > > Add-ins, Templates, Wizards, and Libraries
> > > >
> > > >
> > > > --
> > > > HTH
> > > >
> > > > Bob Phillips
> > > >
> > > > (replace somewhere in email address with gmail if mailing direct)
> > > >
> > > > <(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > I have created a Private Function which accepts 9 parameters from

the
> > > > > user. I don't want to show this function to anybody. How can I

create a
> > > > > password protected addin out of this function so that users can

install
> > > > > that addin and use this function only by supplying the parameters
> > > > > without having access to the vba code.
> > > > >
> > >
> > >

>



 
Reply With Quote
 
streamaxi@gmail.com
Guest
Posts: n/a
 
      8th Nov 2006
Hi! Bob and Jim,

Thank you for the support. Appreciate it.

Bob Phillips wrote:
> Application.Run "Extractor.xla!GetReport", "parameter1", "parameter2",
> "parameter3"
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Thanks,
> >
> > Jim Thomlinson wrote:
> > > Define "Imported the Addin".

> >
> > I meant clicking Tools->Addins and putting a check mark on the addin
> > that I created.
> >
> > > or run the sub
> > >
> > > Application.Run "MyAddin.xla!MySub"

> >
> > I am still struggling with the same. How should be the syntax if the
> > function that I am calling requires parameters?
> >
> > I tried Application.Run "Extractor.xla!GetReport('parameter1',
> > parameter2, 'parameter3')" but it did not work.
> >
> >
> > To directly call the Sub or function in the
> > > addin you need to either create a reference to the addin (Tools ->

> References
> > > -> Find the project in the references list. It helps to rename the VBA
> > > project in order to find it.) or run the sub
> > >
> > > Application.Run "MyAddin.xla!MySub"
> > > --
> > > HTH...
> > >
> > > Jim Thomlinson
> > >
> > >
> > > "(E-Mail Removed)" wrote:
> > >
> > > > Thank you Bob, I read the articles and this is what I did:
> > > >
> > > > I compiled the project on the Debug menu in the Visual Basic Editor.
> > > > Password protected the project
> > > > Saved the file with .xla extention.
> > > >
> > > > then:
> > > >
> > > > I opened a blank workbook and imported the addin that I created
> > > > I wrote a small vba code which calls the function that I createdin the
> > > > addin but I get this error:
> > > >
> > > > Compile error:
> > > > Sub or Function not defined
> > > >
> > > > Bob Phillips wrote:
> > > > > http://support.microsoft.com/default.aspx?kbid=211563
> > > > > How to create an add-in file in Excel 2000
> > > > >
> > > > >

> http://msdn.microsoft.com/library/de...ificaddins.asp
> > > > > Building Application Specific Add-Ins
> > > > >
> > > > >

> http://msdn.microsoft.com/library/de...xceladdins.asp
> > > > > Excel Add-Ins
> > > > >
> > > > >

> http://msdn.microsoft.com/library/de...slibraries.asp
> > > > > Add-ins, Templates, Wizards, and Libraries
> > > > >
> > > > >
> > > > > --
> > > > > HTH
> > > > >
> > > > > Bob Phillips
> > > > >
> > > > > (replace somewhere in email address with gmail if mailing direct)
> > > > >
> > > > > <(E-Mail Removed)> wrote in message
> > > > > news:(E-Mail Removed)...
> > > > > > I have created a Private Function which accepts 9 parameters from

> the
> > > > > > user. I don't want to show this function to anybody. How can I

> create a
> > > > > > password protected addin out of this function so that users can

> install
> > > > > > that addin and use this function only by supplying the parameters
> > > > > > without having access to the vba code.
> > > > > >
> > > >
> > > >

> >


 
Reply With Quote
 
streamaxi@gmail.com
Guest
Posts: n/a
 
      8th Nov 2006
One thing I want to understand is that if a sub or a function is coded
in an addin .xla file, why do we have to type Application.Run? Is there
any other workaround so that it can be called directly without the
application.run? I have defined my function Public in the .xls so my
sub should be able to call the function. Right?

I don't want the Tools->References options because the user will not
know how to go to VBE and enable that option.

Bob Phillips wrote:
> Application.Run "Extractor.xla!GetReport", "parameter1", "parameter2",
> "parameter3"


 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      8th Nov 2006
If it were a function, you can call it from a worksheet, but if you want to
run a sub, its set a reference or use Application.run.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> One thing I want to understand is that if a sub or a function is coded
> in an addin .xla file, why do we have to type Application.Run? Is there
> any other workaround so that it can be called directly without the
> application.run? I have defined my function Public in the .xls so my
> sub should be able to call the function. Right?
>
> I don't want the Tools->References options because the user will not
> know how to go to VBE and enable that option.
>
> Bob Phillips wrote:
> > Application.Run "Extractor.xla!GetReport", "parameter1", "parameter2",
> > "parameter3"

>



 
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
#REF when creating an Addin stewdizzle Microsoft Excel Discussion 11 5th Jan 2007 10:27 PM
#REF when creating an Addin stewdizzle Microsoft Excel Misc 1 4th Jan 2007 06:07 AM
Creating a COM Addin =?Utf-8?B?TVN3ZWV0RzIyMg==?= Microsoft Excel Programming 1 22nd Jul 2006 09:46 AM
Creating Excel Addin salooha Microsoft Excel Programming 6 28th Jun 2005 04:44 PM
[OT] Creating a VS.NET Addin C# Learner Microsoft C# .NET 4 23rd Feb 2004 12:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:48 AM.