Concantenating Text with | and ' (vertical slash and single qoute)

I

Imran J Khan

I have a spread sheet that links with another application. the link is
written as a formula in the cell where the linked value is supposed to appear:
=ILX|Q!'RYL.UN-T.LAST'
My problem is that I am trying to use VBA to get input from user to replace
the RYL and UN and LAST parts of the formula. Everything works except I
cannot add the | (vertical slash) and ' (single quote).

So my current formula that works is:
"=ILXQ!" & TextBox3.Text & "." & TextBox4.Text & "-T,LAST"
but I need it to be like:
"=ILX|Q!'" & TextBox3.Text & "." & TextBox4.Text & "-T,LAST'"
only this last formula does not work (when I try to concantenate it using
vba).

I will greatly appreciate any help.
 
J

J Sedoff comRemove>

When I ran the code you posted, I could get it to run just fine. Please post
more code so we can see if something else is not working. I used your second
line (that you cannot get to work) preceeded by:
Cells(1,1).Value = ...
And it worked just fine, it even put it into the cell correctly.

Have you tried verifying that the textboxes (3 & 4) are indeed being
populated?

What is the error that you are getting when you run this code?

Hope we can help, Jim
 
I

Imran J Khan

Well, What Do You Know.... I DOES WORK!
Well now I just feel like the biggest goof either side of the Rockies.

Thanks for your help J Sedoff, I had been racking my brains on this for a
couple of days.
 
J

J Sedoff comRemove>

I'm glad I was able to .. uh.. help? I have to say that I do love the easy
fixes!

Best of luck, Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top