ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating an addin (https://www.excelbanter.com/excel-programming/377023-creating-addin.html)

[email protected]

Creating an addin
 
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.


Bob Phillips

Creating an addin
 


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)

wrote in message
ups.com...
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.




[email protected]

Creating an addin
 
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)

wrote in message
ups.com...
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.



Jim Thomlinson

Creating an addin
 
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


" 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)

wrote in message
ups.com...
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.




[email protected]

Creating an addin
 
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


" 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)

wrote in message
ups.com...
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.





Bob Phillips

Creating an addin
 
Application.Run "Extractor.xla!GetReport", "parameter1", "parameter2",
"parameter3"

--
HTH

Bob Phillips

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

wrote in message
ups.com...
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


" 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)

wrote in message
ups.com...
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.







[email protected]

Creating an addin
 
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)

wrote in message
ups.com...
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


" 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)

wrote in message
ups.com...
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.






[email protected]

Creating an addin
 
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"



Bob Phillips

Creating an addin
 
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)

wrote in message
ups.com...
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"






All times are GMT +1. The time now is 07:11 AM.

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