Avatar of Saqib Husain
Saqib Husain
Flag for Pakistan asked on

Type mismatch error

I am getting a type mismatch error on this location. I have no idea what could cause this error. Can anyone help me just by looking at this piece of code? I cannot send the code but I can respond to questions.

Error location
Microsoft Excel

Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon
Norie

What is crdlist(i) when you get the error?
Saqib Husain

ASKER
Crdlist is dimensioned as a variant with no dimensions.
And then split using the split command as shown above
The value of i is 2 and n is 235
crdlist
Saqib Husain

ASKER
But why should it error out at Next i  ?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
Martin Liss

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Saqib Husain

ASKER
I have been using the same format since long. Only when the size of the data changes to something (which I have not figured out yet) I get this error.
Norie

A string like '0-3898' can't be converted to Long.

If the purpose of the code is to convert to Long do you actually need the 0 &?
Norie

A string like '0-3898' can't be converted to Long.

If the purpose of the code is to convert to Long do you actually need the 0 &?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Martin Liss

Rather than posting an image could you post the actual code and tell us the values (and types) of all the variables at the time of the error?
Saqib Husain

ASKER
I never looked at anything else while the error was highlighted at Next i

Thanks a lot
Martin Liss

You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014
Your help has saved me hundreds of hours of internet surfing.
fblack61