View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Imran J Khan Imran J Khan is offline
external usenet poster
 
Posts: 17
Default Concantenating Text with | and ' (vertical slash and single qoute)

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.