VBScript command: Split

Results 1 to 2 of 2

Thread: VBScript command: Split

  1. #1
    Patrick Tully Guest

    Default VBScript command: Split

    Has anyone every had success using the vbscript command &#039split&#039? Microsoft&#039s VBScript Language reference says that this command should work, but I get an error everytime I try to use it. Here is my code.<BR><BR>Dim sArray()<BR>Dim sName<BR><BR> sName = "One Two Three"<BR> sArray = Split(sName, " ", -1, 1)<BR><BR>Any help?<BR><BR>

  2. #2
    Jairo Guest

    Default RE: VBScript command: Split

    Patrick,<BR><BR>Instead of dim sArray(), declare sArray like this instead and give it a shot:<BR><BR>dim sArray<BR><BR>After the split(), you should have sArray(0), sArray(1), and sArray(2).<BR><BR>HTH,<BR>Jairo<BR>http://www.citywebarchitects.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •