PC Review


Reply
Thread Tools Rate Thread

Custom Sum Function

 
 
=?Utf-8?B?T21lcg==?=
Guest
Posts: n/a
 
      29th Jun 2007
I want to create a custom function in VBA. The Function will take the
parameter as the sum formula in excel. How do I define parameter in VBA. The
Sum function takes upto 30 arguments but I am interested in only one
augument. I tried the following declarations:
1 Public Sel_Len(Cell_Ref as Range) as Integer
2 Public Sel_Len(Cell_Ref as String) as Integer
I want to get the range cell address so that I can loop it for my
calculation.
Thanks & Regards,

 
Reply With Quote
 
 
 
 
NickHK
Guest
Posts: n/a
 
      29th Jun 2007
Omar,
You are missing one important word:

Public Function Sel_Len(Cell_Ref As Range) As Integer

NickHK

"Omer" <(E-Mail Removed)> wrote in message
news:CA476F99-35EE-4411-91AA-(E-Mail Removed)...
> I want to create a custom function in VBA. The Function will take the
> parameter as the sum formula in excel. How do I define parameter in VBA.

The
> Sum function takes upto 30 arguments but I am interested in only one
> augument. I tried the following declarations:
> 1 Public Sel_Len(Cell_Ref as Range) as Integer
> 2 Public Sel_Len(Cell_Ref as String) as Integer
> I want to get the range cell address so that I can loop it for my
> calculation.
> Thanks & Regards,
>



 
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
Error when adding custom help file to custom function Sabotuer99 Microsoft Excel Programming 1 19th Jul 2008 01:46 PM
Creating a custom function to interpret another custom engine func Ryan Microsoft Excel Programming 0 3rd Mar 2008 07:18 PM
Insert function - custom function name preceded by module name dtshedd@yahoo.com Microsoft Excel Programming 1 2nd Apr 2006 03:46 PM
Emulate Index/Match combo function w/ VBA custom function =?Utf-8?B?U3BlbmNlciBIdXR0b24=?= Microsoft Excel Worksheet Functions 2 2nd May 2005 05:26 PM
Adding a custom function to the default excel function list DonutDel Microsoft Excel Programming 3 21st Nov 2003 03:41 PM


Features
 

Advertising
 

Newsgroups
 


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