PC Review


Reply
Thread Tools Rate Thread

Create User Defined Function with VB.Net

 
 
Troy
Guest
Posts: n/a
 
      15th Aug 2009
Is there a good example of creating a User Defined Function(s) with VB.Net?
I've tried creating a class library and building a .dll, but I could not
register it with
excel. Any help would be appreciated.
 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      16th Aug 2009
Have a look at
http://www.cpearson.com/excel/Creati...nctionLib.aspx

That page explains how to do it and includes a complete VS2008
solution for example code.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Sat, 15 Aug 2009 15:49:01 -0700, Troy
<(E-Mail Removed)> wrote:

>Is there a good example of creating a User Defined Function(s) with VB.Net?
>I've tried creating a class library and building a .dll, but I could not
>register it with
>excel. Any help would be appreciated.

 
Reply With Quote
 
Troy
Guest
Posts: n/a
 
      16th Aug 2009
I've went through the tutorial but when I got to the part that requires you
to Start
External Program (Excel) in the Properties/Debug, thats a problem. That
option is not available. At least not in VB2008 Express. Is there a way to do
it with Express?
I use the Professional Edition at work however I'm trying to prove this
method at home.

Thanks

Troy

"Chip Pearson" wrote:

> Have a look at
> http://www.cpearson.com/excel/Creati...nctionLib.aspx
>
> That page explains how to do it and includes a complete VS2008
> solution for example code.
>
> Cordially,
> Chip Pearson
> Microsoft Most Valuable Professional
> Excel Product Group, 1998 - 2009
> Pearson Software Consulting, LLC
> www.cpearson.com
> (email on web site)
>
>
> On Sat, 15 Aug 2009 15:49:01 -0700, Troy
> <(E-Mail Removed)> wrote:
>
> >Is there a good example of creating a User Defined Function(s) with VB.Net?
> >I've tried creating a class library and building a .dll, but I could not
> >register it with
> >excel. Any help would be appreciated.

>

 
Reply With Quote
 
Chip Pearson
Guest
Posts: n/a
 
      16th Aug 2009

I believe that the Start External Program option is not available in
the Express edition of VS2008.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Sat, 15 Aug 2009 19:01:01 -0700, Troy
<(E-Mail Removed)> wrote:

>I've went through the tutorial but when I got to the part that requires you
>to Start
>External Program (Excel) in the Properties/Debug, thats a problem. That
>option is not available. At least not in VB2008 Express. Is there a way to do
>it with Express?
>I use the Professional Edition at work however I'm trying to prove this
>method at home.
>
>Thanks
>
>Troy
>
>"Chip Pearson" wrote:
>
>> Have a look at
>> http://www.cpearson.com/excel/Creati...nctionLib.aspx
>>
>> That page explains how to do it and includes a complete VS2008
>> solution for example code.
>>
>> Cordially,
>> Chip Pearson
>> Microsoft Most Valuable Professional
>> Excel Product Group, 1998 - 2009
>> Pearson Software Consulting, LLC
>> www.cpearson.com
>> (email on web site)
>>
>>
>> On Sat, 15 Aug 2009 15:49:01 -0700, Troy
>> <(E-Mail Removed)> wrote:
>>
>> >Is there a good example of creating a User Defined Function(s) with VB.Net?
>> >I've tried creating a class library and building a .dll, but I could not
>> >register it with
>> >excel. Any help would be appreciated.

>>

 
Reply With Quote
 
Troy
Guest
Posts: n/a
 
      16th Aug 2009
I've got vs2005 standard edition at home so I'll give that a shot. Thanks

Troy

"Chip Pearson" wrote:

>
> I believe that the Start External Program option is not available in
> the Express edition of VS2008.
>
> Cordially,
> Chip Pearson
> Microsoft Most Valuable Professional
> Excel Product Group, 1998 - 2009
> Pearson Software Consulting, LLC
> www.cpearson.com
> (email on web site)
>
>
> On Sat, 15 Aug 2009 19:01:01 -0700, Troy
> <(E-Mail Removed)> wrote:
>
> >I've went through the tutorial but when I got to the part that requires you
> >to Start
> >External Program (Excel) in the Properties/Debug, thats a problem. That
> >option is not available. At least not in VB2008 Express. Is there a way to do
> >it with Express?
> >I use the Professional Edition at work however I'm trying to prove this
> >method at home.
> >
> >Thanks
> >
> >Troy
> >
> >"Chip Pearson" wrote:
> >
> >> Have a look at
> >> http://www.cpearson.com/excel/Creati...nctionLib.aspx
> >>
> >> That page explains how to do it and includes a complete VS2008
> >> solution for example code.
> >>
> >> Cordially,
> >> Chip Pearson
> >> Microsoft Most Valuable Professional
> >> Excel Product Group, 1998 - 2009
> >> Pearson Software Consulting, LLC
> >> www.cpearson.com
> >> (email on web site)
> >>
> >>
> >> On Sat, 15 Aug 2009 15:49:01 -0700, Troy
> >> <(E-Mail Removed)> wrote:
> >>
> >> >Is there a good example of creating a User Defined Function(s) with VB.Net?
> >> >I've tried creating a class library and building a .dll, but I could not
> >> >register it with
> >> >excel. Any help would be appreciated.
> >>

>

 
Reply With Quote
 
Troy
Guest
Posts: n/a
 
      16th Aug 2009
I've downloaded you vb example code however a password is required after I
try to open it in Visual Studio. Could you share the password?

Thank you,

"Chip Pearson" wrote:

>
> I believe that the Start External Program option is not available in
> the Express edition of VS2008.
>
> Cordially,
> Chip Pearson
> Microsoft Most Valuable Professional
> Excel Product Group, 1998 - 2009
> Pearson Software Consulting, LLC
> www.cpearson.com
> (email on web site)
>
>
> On Sat, 15 Aug 2009 19:01:01 -0700, Troy
> <(E-Mail Removed)> wrote:
>
> >I've went through the tutorial but when I got to the part that requires you
> >to Start
> >External Program (Excel) in the Properties/Debug, thats a problem. That
> >option is not available. At least not in VB2008 Express. Is there a way to do
> >it with Express?
> >I use the Professional Edition at work however I'm trying to prove this
> >method at home.
> >
> >Thanks
> >
> >Troy
> >
> >"Chip Pearson" wrote:
> >
> >> Have a look at
> >> http://www.cpearson.com/excel/Creati...nctionLib.aspx
> >>
> >> That page explains how to do it and includes a complete VS2008
> >> solution for example code.
> >>
> >> Cordially,
> >> Chip Pearson
> >> Microsoft Most Valuable Professional
> >> Excel Product Group, 1998 - 2009
> >> Pearson Software Consulting, LLC
> >> www.cpearson.com
> >> (email on web site)
> >>
> >>
> >> On Sat, 15 Aug 2009 15:49:01 -0700, Troy
> >> <(E-Mail Removed)> wrote:
> >>
> >> >Is there a good example of creating a User Defined Function(s) with VB.Net?
> >> >I've tried creating a class library and building a .dll, but I could not
> >> >register it with
> >> >excel. Any help would be appreciated.
> >>

>

 
Reply With Quote
 
Troy
Guest
Posts: n/a
 
      16th Aug 2009
Ok i've done everything so far with the tutorial excel start up just fine, I
created my .pfx in the project, etc. You say to unload the addin. Do you mean
under (Excel Options) (Add-ins)? I'm not seeing anything to unload. I think
i'm just about there but i cannot see the functions.

"Chip Pearson" wrote:

>
> I believe that the Start External Program option is not available in
> the Express edition of VS2008.
>
> Cordially,
> Chip Pearson
> Microsoft Most Valuable Professional
> Excel Product Group, 1998 - 2009
> Pearson Software Consulting, LLC
> www.cpearson.com
> (email on web site)
>
>
> On Sat, 15 Aug 2009 19:01:01 -0700, Troy
> <(E-Mail Removed)> wrote:
>
> >I've went through the tutorial but when I got to the part that requires you
> >to Start
> >External Program (Excel) in the Properties/Debug, thats a problem. That
> >option is not available. At least not in VB2008 Express. Is there a way to do
> >it with Express?
> >I use the Professional Edition at work however I'm trying to prove this
> >method at home.
> >
> >Thanks
> >
> >Troy
> >
> >"Chip Pearson" wrote:
> >
> >> Have a look at
> >> http://www.cpearson.com/excel/Creati...nctionLib.aspx
> >>
> >> That page explains how to do it and includes a complete VS2008
> >> solution for example code.
> >>
> >> Cordially,
> >> Chip Pearson
> >> Microsoft Most Valuable Professional
> >> Excel Product Group, 1998 - 2009
> >> Pearson Software Consulting, LLC
> >> www.cpearson.com
> >> (email on web site)
> >>
> >>
> >> On Sat, 15 Aug 2009 15:49:01 -0700, Troy
> >> <(E-Mail Removed)> wrote:
> >>
> >> >Is there a good example of creating a User Defined Function(s) with VB.Net?
> >> >I've tried creating a class library and building a .dll, but I could not
> >> >register it with
> >> >excel. Any help would be appreciated.
> >>

>

 
Reply With Quote
 
Chip Pearson
Guest
Posts: n/a
 
      17th Aug 2009
Once you've created and built the NET class library, create a
Deployment project and add the class library DLL to the list of
required files. Build the Setup project. Then, run the Setup.exe
program that was created by the Setup project build. Once the
Setup.exe has run, open Excel, and then open the Add-Ins dialog. Click
the Automation button and find the NET class in the list and click OK.
If you get a message like "cannot find mscore, delete from list?"
click No.

Now, you can use the functions in the class lib directly from
worksheet cells.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Sun, 16 Aug 2009 14:38:01 -0700, Troy
<(E-Mail Removed)> wrote:

>Ok i've done everything so far with the tutorial excel start up just fine, I
>created my .pfx in the project, etc. You say to unload the addin. Do you mean
>under (Excel Options) (Add-ins)? I'm not seeing anything to unload. I think
>i'm just about there but i cannot see the functions.
>
>"Chip Pearson" wrote:
>
>>
>> I believe that the Start External Program option is not available in
>> the Express edition of VS2008.
>>
>> Cordially,
>> Chip Pearson
>> Microsoft Most Valuable Professional
>> Excel Product Group, 1998 - 2009
>> Pearson Software Consulting, LLC
>> www.cpearson.com
>> (email on web site)
>>
>>
>> On Sat, 15 Aug 2009 19:01:01 -0700, Troy
>> <(E-Mail Removed)> wrote:
>>
>> >I've went through the tutorial but when I got to the part that requires you
>> >to Start
>> >External Program (Excel) in the Properties/Debug, thats a problem. That
>> >option is not available. At least not in VB2008 Express. Is there a way to do
>> >it with Express?
>> >I use the Professional Edition at work however I'm trying to prove this
>> >method at home.
>> >
>> >Thanks
>> >
>> >Troy
>> >
>> >"Chip Pearson" wrote:
>> >
>> >> Have a look at
>> >> http://www.cpearson.com/excel/Creati...nctionLib.aspx
>> >>
>> >> That page explains how to do it and includes a complete VS2008
>> >> solution for example code.
>> >>
>> >> Cordially,
>> >> Chip Pearson
>> >> Microsoft Most Valuable Professional
>> >> Excel Product Group, 1998 - 2009
>> >> Pearson Software Consulting, LLC
>> >> www.cpearson.com
>> >> (email on web site)
>> >>
>> >>
>> >> On Sat, 15 Aug 2009 15:49:01 -0700, Troy
>> >> <(E-Mail Removed)> wrote:
>> >>
>> >> >Is there a good example of creating a User Defined Function(s) with VB.Net?
>> >> >I've tried creating a class library and building a .dll, but I could not
>> >> >register it with
>> >> >excel. Any help would be appreciated.
>> >>

>>

 
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
Create a user-defined function Max Microsoft Excel Programming 2 23rd Jan 2008 05:57 PM
Create user-defined function using Querytables david95554352 Microsoft Excel Worksheet Functions 0 19th Sep 2006 07:21 AM
How can I create a user defined function in excel? =?Utf-8?B?TWFydGluag==?= Microsoft Excel Misc 4 20th Aug 2005 06:11 PM
How to create User Defined Function Warwick Renshaw Microsoft Excel Programming 0 25th Jul 2003 07:15 AM
Re: Create help for user-defined function Tom Ogilvy Microsoft Excel Programming 0 12th Jul 2003 06:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:36 PM.