Wrox Home  
Search P2P Archive for: Go

  Return to Index  

interdev_programming thread: RE: E: vb script help!


Message #1 by <Kafila.Patel@t...> on Tue, 24 Jul 2001 19:35:45 -0500
Hi Kafila,

Your function works fine. It does create and return
multiple spaces.

Suming

-----Original Message-----
From: Kafila.Patel@t... [mailto:Kafila.Patel@t...]
Sent: Tuesday, July 24, 2001 7:36 PM
To: Interdev_Programming
Subject: [interdev_programming] RE: E: vb script help!


         Hi Jeff,
       
        Thanx for the reply.I have tried that already. After I build the

string with  , the problem is , later on I'm not able to remove
those
        spaces from the string after the user selects it from the
dropdown.eg

        string: '5555        A'
        I'm not able to remove the spaces out of the returned string
with the usual functions (Instr,Trim) functions.

        Thanks.

       


   

-----Original Message-----
From: JeffS@A... [mailto:JeffS@A...]
Sent: Tuesday, July 24, 2001 7:06 PM
To: interdev_programming@p...
Subject: [interdev_programming] RE: vb script help!



You will need to build a return string that contains  "noOfSpaces" * the

HTML space character " "

Jeff

-----Original Message-----
From: Kafila.Patel@t... [ mailto:Kafila.Patel@t...]
Sent: Wednesday, 25 July 2001 9:47 am
To: Interdev_Programming
Subject: [interdev_programming] vb script help!


Hi,

I have a question in VB Scripting.I have a String 'part no' and a string


'rev'

now based on a calculation I have to put spaces between part no and rev
before I put it in my Drop down.Attached is the code that does that:

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

This is the attached function.The problem is when the function returns I


have only one space in the returned String.Why doesn't it attach more
than one space?

Any help will be appreciated.
Thanks.


---

  Return to Index