Computer

For Online Computer Support, Ask a Computer Technician

Ask a Computer Expert,
Get an Answer ASAP!

Computer

I have the following lines of code. Sometimes, there will be

Customer Question
an error from the line...
I have the following lines of code. Sometimes, there will be an error from the line of code:Else: concat = concat & " ~ " & Cells(i, j).Value. The error depends on the type of the cell variable. The error message is 'Type mismatch'. How can I change the code to make it more robust. The VBS program is to write excel files into text files.
For i = 1 To numrows
concat = " "
For j = 1 To numcols
If j = 1 Then
concat = Cells(i, j).Value
Else: concat = concat & " ~ " & Cells(i, j).Value
End If
Next j
If concat String(Len(concat), "|") Then ' i.e. all data in row is blank
concat = Replace(concat, Chr(10), " ") ' removes return characters
Print #fn, concat
End If
Next i
Submitted: 2 years ago.Category: Computer
Show More
Show Less
Ask Your Own Computer Question
Answered in 28 minutes by:
6/12/2015
Tech Support Specialist: Jason Jones, Computer Expert replied 2 years ago
Jason Jones
Jason Jones, Computer Expert
Category: Computer
Satisfied Customers: 17,116
Experience: Over 10 years of professional experience.
Verified





If anyone wishes to ask Jason a question directly,
they can do so at the following page: www.JasonFixedit.com

Hello,
My name is Jason. I look forward to helping you today.
Without seeing the values that they are pulling, I must assume that the problem is due to the fact that it is not trying to add the value as text.
Change the following line to match the one below it:
Else: concat = concat & " ~ " & Cells(i, j).Value
Correct code:
Else: concat = concat & " ~ " & Cells(i, j).Text
That will fix your problem.
I look forward to your next message or your rating below.
Please, do not forget to rate my help on this page.
Thank you again,
- Jason
Ask Your Own Computer Question
Ask Jason Jones Your Own Question
Jason Jones
Jason Jones
Jason Jones, Computer Expert
Category: Computer
Satisfied Customers: 17,116
17,116 Satisfied Customers
Experience: Over 10 years of professional experience.

Jason Jones is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

I am very happy with my very fast response. Eric is very knowledgeable in the subject area. Thank you!

RPAustin, TX

Hi John, Thank you for your expertise and, more important, for your kindness because they make me, almost, look forward to my next computer problem. After the next problem comes, I'll be delighted to correspond again with you. I'm told that I excel at programing. But system administration has never been one of my talents. So it's great to have an expert to rely on when the computer decides to stump me. God bless, Bill

Bill M.Schenectady, New York

The Expert answered my Mac question and was patient. He answered in a thorough and timely manner, keeping the response on a level that could understand. Thank you!

FrankCanada

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

< Previous | Next >

Meet the Experts:

Andy

Andy

Computer Consultant

5,316 satisfied customers

11yr exp, Comp Engg, Internet expert, Web developer, SEO

Engineer John C.

Engineer John C.

Computer Science Engineer

3,227 satisfied customers

Computer Science Engineer with 10 years of experience in Computer Support, and Microsoft, A+ and Cisco certified

Ryan H.

Ryan H.

Computer Support Specialist

1,741 satisfied customers

A+ Certified Technician - 10 Years experience working with all types of computer systems.

Jane Lefler

Jane Lefler

Sr Prog Analyst / Technician

2 satisfied customers

Computer Programmer / Technician/ Consultant 16+ years

Frederick S.

Frederick S.

Computer Specialist

7,241 satisfied customers

Computer technician and founder of a home PC repair company.

lifesaver

lifesaver

Computer Software Engineer

4,288 satisfied customers

Engineering degree in Computer science,Microsoft Certified Professional.JA computer expert.

Sudipto

Sudipto

Hardware Engineer

4,157 satisfied customers

Certificate Course In Computer Maintenance

< Previous | Next >

Related Computer Questions
I'm wr3444! I play biggest game you have daily! For the past
I'm wr3444! I play biggest game you have daily! For the past 4 mos my screen suddenly goes blank about every 30 minutes, sometime in the middle of a huge hand! … read more
Specialist Sean S.
Specialist Sean S.
Computer Support Technician
746 satisfied customers
I canreminder my password to my computer I have forgotten
Second opinion] I canreminder my password ***** my computer I have forgotten it. … read more
Pete
Pete
Engineer
Bachelor\u0027s Degree
1,112 satisfied customers
Just bought & had Acer Aspire computer set up yesterday. My
Just bought & had Acer Aspire computer set up yesterday. My computer … read more
Byron
Byron
IT Support Specialist
Bachelor\u0027s Degree
410 satisfied customers
Can't send mail. No error message
Can't send mail JA: Are emails stuck in your outbox or are you receiving an error message? Customer: No error message JA: Are there any antivirus or firewall settings that could block you from sending… read more
Josh
Josh
It Support Specialist
Associate Degree
5,134 satisfied customers
Google won't let me sign in on my reset tablet. About 5
about 5 minutes ago, as directed by the google sign in screen. … read more
Pete
Pete
Engineer
Bachelor\u0027s Degree
1,112 satisfied customers
My desktop computer cannot receive incoming messages. Dell
my desktop computer cannot receive incoming messages … read more
Cody
Cody
Computer Science
1,563 satisfied customers
I juqst activated the Windows 10 update. Now the icon where
I juqst activated the Windows 10 update. Now the icon where I reached my Documents, Downloads, Picture etc. is gone. Howdo I get it back so I can access these things in a coherent way? … read more
hongkongpom
hongkongpom
Computer Desktop Support
Associate Degree
286 satisfied customers
I'm 75 need advise on a password manager, I'm pretty savage
I'm 75 need advise on a password ***** I'm pretty savage on computer … read more
Isaac Franklin
Isaac Franklin
Associate of Science in Social Sciences
884 satisfied customers
I am unable to copy an 8 and 1/2 by 11 page. i beg you to
i am unable to copy an 8 and 1/2 by 11 page. i beg you to call me and help me or i shall return this copier to amazon peter webber(###) ###-####… read more
Bhavik Joshi
Bhavik Joshi
Computer Science and Engineering
608 satisfied customers
I recently had my computer crash and after being fixed my
I recently had my computer crash and after being fixed my printer won't work. How do I reinstall it? … read more
Cody
Cody
Computer Science
1,563 satisfied customers
I want to know also...Microsoft has taken over my computer
I want to know also...Microsoft has taken over my computer for updates taking a very long time and then says "restoring previous version of Windows" and then says it cannot complete updates and takes … read more
Cody
Cody
Computer Science
1,563 satisfied customers
I have a new desk top and need todown load my WD My Passport
I have a new desk top and need todown load my WD My Passport ultra...how do I go about doing this so I can start a back up … read more
Kamil Anwar
Kamil Anwar
IT Consultant / Systems Engineer
Bachelor\u0027s Degree
429 satisfied customers
Microsoft updated yesterday on my PC and now I can't access
Microsoft updated yesterday on my PC and now I can't access my email. Every time I hit send/receive it tells me it's not implemented. … read more
Cody
Cody
Computer Science
1,563 satisfied customers
I canreminder my password to my computer I have forgotten
I canreminder my password ***** my computer I have forgotten it. … read more
Dan
Dan
IT/Broadcast Engineer
Bachelor\u0027s Degree
507 satisfied customers
My Lenovo went to sleep and won't come back on. The lights
My Lenovo went to sleep and won't come back on. The lights are on under they keys. How can I get it up and running? … read more
Specialist Sean S.
Specialist Sean S.
Computer Support Technician
746 satisfied customers
I can;t print anything from my Acer laptop. It says I must
I can;t print anything from my Acer laptop. It says I must run One Note for the first time in order to print. I don't know what One Note is, … read more
Cody
Cody
Computer Science
1,563 satisfied customers
I am having trouble calling out on Skype since I loaded up
Hi! I am having trouble calling out on Skype since I loaded up the new upgrade. I can't call from my Skype to another Skype number. I have $28 of credits. I can call to another landline. Also the scre… read more
Josh
Josh
It Support Specialist
Associate Degree
5,134 satisfied customers
I am trying to place an add they wanted my social media
i am trying to place an add they wanted my social media twitter carol warren @lalady2011 then they said ooops theres a problem and i am stuck… read more
Josh
Josh
It Support Specialist
Associate Degree
5,134 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x