I'm trying to set the value of cells to exactly the following:
='120!TA_;|={''Sheets(3).Cells(a, 1''}'}
I seem to be having a far more difficult time with the line than I
should be.
The ' comments everything behind it out.
Sheets(3).Cells(a, 33) = ????
If someone could throw me a bone here, I'd appreciate it. TIA--
Paul987
------------------------------------------------------------------------
Paul987's Profile: www.excelforum.com/member.php...oamp;userid=24850
View this thread: www.excelforum.com/showthread...hreadid=522246The single quote is O.K. inside a string:
Sub Macro1()
Dim s As String
s = quot; ' quot;
Cells(1, 1).Value = s
End SubMake your equation as a string variable and then deposit it in a cell
--
Gary''s Studentquot;Paul987quot; wrote:
gt;
gt; I'm trying to set the value of cells to exactly the following:
gt;
gt; ='120!TA_;|={''Sheets(3).Cells(a, 1''}'}
gt;
gt; I seem to be having a far more difficult time with the line than I
gt; should be.
gt; The ' comments everything behind it out.
gt;
gt; Sheets(3).Cells(a, 33) = ????
gt; If someone could throw me a bone here, I'd appreciate it. TIA
gt;
gt;
gt; --
gt; Paul987
gt; ------------------------------------------------------------------------
gt; Paul987's Profile: www.excelforum.com/member.php...oamp;userid=24850
gt; View this thread: www.excelforum.com/showthread...hreadid=522246
gt;
gt;
I am having an incredibly difficult time with this. Here is an
example:
I want cell (a, 33) to equal exactly ='120.120.120.12!TA_SRV'
This does not work: quot;='120.120.120.12!TA_SRV'quot; any ideas?
My actual string is more complicated than this, but I'm hoping to be
able to extrapolate any advice receive.--
Paul987
------------------------------------------------------------------------
Paul987's Profile: www.excelforum.com/member.php...oamp;userid=24850
View this thread: www.excelforum.com/showthread...hreadid=522246
Anyone else have any adive for me. There seems to be a trick somewhere
that I am missing... Thx--
Paul987
------------------------------------------------------------------------
Paul987's Profile: www.excelforum.com/member.php...oamp;userid=24850
View this thread: www.excelforum.com/showthread...hreadid=522246If you want the literal string
='120.120.120.12!TA_SRV'
in a cell, preformat it as text before assigning the value:
With ActiveCell
.NumberFormat = quot;@quot;
.Value = quot;='120.120.120.12!TA_SRV'quot;
End WithAlternatively, preface your string with a single quote:
ActiveCell.Value = quot;'='120.120.120.12!TA_SRV'quot;
The single quote indicates to XL that the following characters are to be
interpreted as text. You'll see the single quote in the formula bar, but
not in the cell.
OTOH, if you're trying to enter a formula,
='120.120.120.12!TA_SRV'
is not a valid formula. What formula would you successfully enter
manually?
In article gt;,
Paul987 gt; wrote:
gt; Anyone else have any adive for me. There seems to be a trick somewhere
gt; that I am missing... Thx
- Jan 24 Wed 2007 20:35
Using amp;Chr$(39)amp; as substitute for ' in VBA
close
全站熱搜
留言列表
發表留言