Thread
:
create function with passing parameters
View Single Post
#
2
Posted to microsoft.public.excel.programming
Bob Phillips[_6_]
external usenet poster
Posts: 11,272
create function with passing parameters
Is this what you want
Function TextInfix(CurrChar As String, CharInfix As String, _
TextLong As Integer) As String
TextInfix = Application.Rept(CharInfix, TextLong) & CurrChar
End Function
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"DASmania Cool" <DASmania
wrote in message
...
i want to create my own function with passing parameters. Here's the case
:
Cell A1 = 5
Cell B1 = 0
and I want cell C1 = 00005
i have this function but i don't know how to insert in macro :
Function TextInfix(CurrChar As String, CharInfix As String, TextLong As
Integer) As String
Dim CharLong As Integer, TmpInfix$
CharLong = Len(CurrChar)
TmpInfix = String(TextLong - CharLong, CharInfix) & CurrChar
TextInfix = TmpInfix
End Function
Reply With Quote
Bob Phillips[_6_]
View Public Profile
Find all posts by Bob Phillips[_6_]