Solved

Type Mismatch while using Split on an array...???

Posted on 2006-11-13
2
401 Views
Last Modified: 2012-06-27
I've got some values stored in an array like so:

CustomInformation = 555-555-5555 | FedEx Ground | de | 123

I'm trying to get each piece into its own variable so I used Split:

Split(CustomInformation = 555-555-5555 | FedEx Ground | de | 123,"|")

Then, if I go ahead and print these values to the screen it works fine:

Response.Write(CustomInformationSplit(0) & "<br>" & CustomInformationSplit(1) & "<br>" & CustomInformationSplit(2) & "<br>" & CustomInformationSplit(3))

However, when I try and simply populate a new variable with the value of the first array value, the phone number, I'm getting a type mismatch error.

billingPhoneNumber = CustomInformation(0)

returns

Microsoft VBScript runtime  error '800a000d'
Type mismatch: 'CustomInformation'

I'm guessing it must be something to do with the -'s?  Is it trying to subtract 555 from 555 from 555?  How do I make this work?  Any information would be greatly appreciated.  thanks!
0
Comment
Question by:Andrew Angell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Accepted Solution

by:
Morcalavin earned 250 total points
ID: 17932273
I thought your array  name was CustomInformationSplit, but here you have:
billingPhoneNumber = CustomInformation(0)

Should be:
billingPhoneNumber = CustomInformationSplit(0)

Split should be
CustomInformationSplit = Split(YourData, "|")
0
 
LVL 11

Author Comment

by:Andrew Angell
ID: 17932632
Well write moron on my forehead.  You got it!  thanks!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
wordpress display sub menu only when click 12 75
alert(innerHTML); 8 39
MS SQL and column defined as time 7 27
Clear input text 15 27
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question