Wrox Home  
Search P2P Archive for: Go

  Return to Index  

interdev_programming thread: vb script help!


Message #1 by <Kafila.Patel@t...> on Tue, 24 Jul 2001 18:47:07 -0500
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; 
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 
5.5.2650.12">
<TITLE>RE: [interdev_programming] vb script help!</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>You will need to build a return string that 
contains  "noOfSpaces" * the HTML space character 
"&nbsp;"</FONT>
</P>

<P><FONT SIZE=3D2>Jeff</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Kafila.Patel@t... [<A 
HREF=3D"mailto:Kafila.Patel@t...">mailto:Kafila.Patel@t...
</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, 25 July 2001 9:47 am</FONT>
<BR><FONT SIZE=3D2>To: Interdev_Programming</FONT>
<BR><FONT SIZE=3D2>Subject: [interdev_programming] vb script 
help!</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Hi,</FONT>
</P>

<P><FONT SIZE=3D2>I have a question in VB Scripting.I have a String 
'part no' and a string </FONT>
<BR><FONT SIZE=3D2>'rev'</FONT>
</P>

<P><FONT SIZE=3D2>now based on a calculation I have to put spaces 
between part no and rev </FONT>
<BR><FONT SIZE=3D2>before I put it in my Drop down.Attached is the code 
that does that:</FONT>
</P>

<P><FONT SIZE=3D2><%Function CreateSpaces(partno,rev) </FONT>
<BR><FONT SIZE=3D2>dim strLength,I dim totallength </FONT>
<BR><FONT SIZE=3D2>dim noOfSpaces </FONT>
<BR><FONT SIZE=3D2>totallength =3D 25 </FONT>
<BR><FONT SIZE=3D2>strLength=3DLen(partno) + Len(rev) </FONT>
<BR><FONT SIZE=3D2>noOfSpaces =3D totallength-strLength </FONT>
<BR><FONT SIZE=3D2>CreateSpaces =3D partno & Space(noOfSpaces) 
& rev </FONT>
<BR><FONT SIZE=3D2>end function %> </FONT>
</P>

<P><FONT SIZE=3D2>This is the attached function.The problem is when the 
function returns I </FONT>
<BR><FONT SIZE=3D2>have only one space in the returned String.Why 
doesn't it attach more </FONT>
<BR><FONT SIZE=3D2>than one space?</FONT>
</P>

<P><FONT SIZE=3D2>Any help will be appreciated.</FONT>
<BR><FONT SIZE=3D2>Thanks.</FONT>
</P>
<BR>
<BR>


  Return to Index