Custom Sum Function

G

Guest

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,
 
N

NickHK

Omar,
You are missing one important word:

Public Function Sel_Len(Cell_Ref As Range) As Integer

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top