Hello Friends,

Just would like to share the code I created to determine what parameter needed for User Define Function.

This function takes Folder Path where all your User Define Functions are located. After Executing this function, it generates .html file called "UserDefineFunctionInfo.html".

NOTE: Since this forum does not allow HTML tags Html, Body, and Head, I have to remove the this < and this > around them. So please when you copy this code put them back around Html, Body and Head.
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Function GetUserDefineFunctionInfo(sFolderPath)
Dim fso, f, f1, s, sf,fso2,f2
Const ForWriting = 2
Const ForAppending = 8
sHtmlFileName=&quot;UserDefineFunctionInfo.html&qu ot;

Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot
If fso.FolderExists(sFolderPath) = False then
Reporter.ReportEvent micFail,&quot;Folder not found&quot;, sFolderPath
end if

Set fso2 = CreateObject(&quot;Scripting.FileSystemObject&quot
If right(trim(sFolderPath),1) = &quot;\&quot; Then
sHtmlFileNameWithPath=sFolderPath &amp; sHtmlFileName
sHtmlFileNameWithPath=sFolderPath &amp; &quot;\&quot; &amp; sHtmlFileName
End If

If fso2.FileExists(sHtmlFileNameWithPath) = True then
end if

Set f2 = fso2.OpenTextFile(sFolderPath &amp; sHtmlFileName, ForAppending, True)
f2.WriteLine &quot;html&quot;
f2.WriteLine &quot;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&quot;
f2.WriteLine &quot;head&amp;gt;/head&amp;gt;&quot;
f2.WriteLine &quot;body&quot;

Set f = fso.GetFolder(sFolderPath)
Set sf = f.SubFolders
For Each f1 in sf
Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot
objStartFolder = sFolderPath &amp; &quot;\&quot; &amp; f1.name
Set objFolder = objFSO.GetFolder(objStartFolder)
Set colFiles = objFolder.Files
For Each objFile in colFiles
Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot
Set objFile1 = objFSO.OpenTextFile(objFile, 1)
Do Until objFile1.AtEndOfStream
strCharacters = trim(objFile1.ReadLine())
If mid(strCharacters,1,8) = &quot;Function&quot; or mid(strCharacters,1,8) = &quot;function&quot; Then
iCnt=iCnt + 1
Reporter.ReportEvent micPass,&quot;Folder&quot;,strCharacters
f2.WriteLine iCnt &amp; &quot &amp;lt;B&amp;gt;&quot; &amp; strCharacters &amp; vbCr &amp; &quot;&amp;lt;/B&amp;gt;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&quot ;
Exit do
End If
f2.WriteLine &quot;/body&quot;
f2.WriteLine &quot;&amp;lt;/html&amp;gt;&quot;
End function</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Prashant Patel

[ 10-13-2005, 07:36 AM: Message edited by: ppat7046 ]