Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Custom Sum Function

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,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Custom Sum Function

Omar,
You are missing one important word:

Public Function Sel_Len(Cell_Ref As Range) As Integer

NickHK

"Omer" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert function - custom function name preceded by module name [email protected] Excel Programming 1 April 2nd 06 03:46 PM
Custom Function: Detecting the cell the function is used in g-boy Excel Programming 2 June 11th 05 06:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
custom function - with built-in function VilMarci Excel Programming 14 January 25th 05 04:15 PM
Adding a custom function to the default excel function list DonutDel Excel Programming 3 November 21st 03 03:41 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"