<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How To: Fix a Recorded Macro</title>
	<atom:link href="http://peltiertech.com/WordPress/how-to-fix-a-recorded-macro/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress/how-to-fix-a-recorded-macro/</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Mon, 15 Mar 2010 17:19:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/how-to-fix-a-recorded-macro/comment-page-1/#comment-12328</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Mon, 23 Mar 2009 21:42:12 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/11/how-to-fix-a-recorded-macro/#comment-12328</guid>
		<description>Here is the relevant code:

&lt;pre class=&quot;vbasmall&quot;&gt;Sub SubScriptTitle()
  Dim sTitle As String
  
  sTitle = &quot;CO2 Emissions&quot;
  
  With Sheets(&quot;Sheet1&quot;).Cells(1, 1)
    .Value = sTitle
    .Characters(3, 1).Font.Subscript = True
  End With
End Sub&lt;/pre&gt;
 
Here, With means take Sheets(&quot;Sheet1&quot;).Cells(1, 1) and perform the following actions with it. The first action is to put the title into the cell, the second is to take a substring starting at character 3, one character long, and subscript it.</description>
		<content:encoded><![CDATA[<p>Here is the relevant code:</p>
<pre class="vbasmall">Sub SubScriptTitle()
  Dim sTitle As String

  sTitle = "CO2 Emissions"

  With Sheets("Sheet1").Cells(1, 1)
    .Value = sTitle
    .Characters(3, 1).Font.Subscript = True
  End With
End Sub</pre>
<p> <br />
Here, With means take Sheets(&#8220;Sheet1&#8243;).Cells(1, 1) and perform the following actions with it. The first action is to put the title into the cell, the second is to take a substring starting at character 3, one character long, and subscript it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ckz</title>
		<link>http://peltiertech.com/WordPress/how-to-fix-a-recorded-macro/comment-page-1/#comment-12327</link>
		<dc:creator>ckz</dc:creator>
		<pubDate>Mon, 23 Mar 2009 21:26:44 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/11/how-to-fix-a-recorded-macro/#comment-12327</guid>
		<description>Thank you for the help.  I am a little confused because the sample code is looking for a range of cells.

In my situation, the title is actually written in the code, not drawn from data in a cell.  

Sub Title()
Dim Title As String
Dim StringLength As Integer

Title = &quot;CO2 Emissions&quot;
StringLength = Len(Title)   

Sheets(&quot;Sheet1&quot;).Cells(1, 1) = Title

End Sub

I don&#039;t understand how to use the With statements to make the 2 in CO2 subscript.

Thank you.</description>
		<content:encoded><![CDATA[<p>Thank you for the help.  I am a little confused because the sample code is looking for a range of cells.</p>
<p>In my situation, the title is actually written in the code, not drawn from data in a cell.  </p>
<p>Sub Title()<br />
Dim Title As String<br />
Dim StringLength As Integer</p>
<p>Title = &#8220;CO2 Emissions&#8221;<br />
StringLength = Len(Title)   </p>
<p>Sheets(&#8220;Sheet1&#8243;).Cells(1, 1) = Title</p>
<p>End Sub</p>
<p>I don&#8217;t understand how to use the With statements to make the 2 in CO2 subscript.</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/how-to-fix-a-recorded-macro/comment-page-1/#comment-12325</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Mon, 23 Mar 2009 19:40:07 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/11/how-to-fix-a-recorded-macro/#comment-12325</guid>
		<description>One suggestion is to find a font that has sub- and superscripted characters.

The way I had to do it on one project was to assign the superscript format to only some of the characters in the text element. I show this in the &lt;a href=&quot;http://peltiertech.com/Excel/Charts/ScientificNotation.html&quot; rel=&quot;nofollow&quot;&gt;Scientific/Exponential Notation Axis Labels&lt;/a&gt; tutorial to produce the exponent on the powers of ten.

&lt;pre class=&quot;vbasmall&quot;&gt;With srs.Points(Counter)
    &#039; Apply label to point
    .HasDataLabel = True
    .DataLabel.Characters.Text = _
        myString1
    &#039; Superscript part of the label
    With .DataLabel.Characters(3, Len(myString1) - 2).Font
        .Superscript = True
        .Size = .Size + 1
    End With
End With&lt;/pre&gt;
 
The segment of the label is accessed using .Characters(start, length). I increased the size of the superscripted text by one point to make it legible.</description>
		<content:encoded><![CDATA[<p>One suggestion is to find a font that has sub- and superscripted characters.</p>
<p>The way I had to do it on one project was to assign the superscript format to only some of the characters in the text element. I show this in the <a href="http://peltiertech.com/Excel/Charts/ScientificNotation.html" rel="nofollow">Scientific/Exponential Notation Axis Labels</a> tutorial to produce the exponent on the powers of ten.</p>
<pre class="vbasmall">With srs.Points(Counter)
    ' Apply label to point
    .HasDataLabel = True
    .DataLabel.Characters.Text = _
        myString1
    ' Superscript part of the label
    With .DataLabel.Characters(3, Len(myString1) - 2).Font
        .Superscript = True
        .Size = .Size + 1
    End With
End With</pre>
<p> <br />
The segment of the label is accessed using .Characters(start, length). I increased the size of the superscripted text by one point to make it legible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ckz</title>
		<link>http://peltiertech.com/WordPress/how-to-fix-a-recorded-macro/comment-page-1/#comment-12324</link>
		<dc:creator>ckz</dc:creator>
		<pubDate>Mon, 23 Mar 2009 19:02:20 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/11/how-to-fix-a-recorded-macro/#comment-12324</guid>
		<description>Using VBA I am assigning several different charts to the same worksheet.  Based on a button the user presses, the correct chart will appear.

So, to change the title of the worksheet and within the chart I assign the title, simply by saying Title = &quot;Water&quot;.  Where ever I need that specific text in the code, I use Title.

My question is, how do I subscript in the text of the editor box.  This code changing is not my own.  The previous programmer was able to add superscript within the editor box.  Is there a way to do subscript?

He simply had Title = &quot;Water m³&quot;

I am trying to say Title = &quot;CO2 emissions&quot;
(I cut and pasted the m3 from the program and the format stays, even in this email.  I cut and pasted from a word document the CO2... and the 2 was subscript, but didn&#039;t carry over in this email)

I hope this question makes sense.  I have seen a lot of website resources for formating specific cells, but nothing within the VBA editor.

Thanks,</description>
		<content:encoded><![CDATA[<p>Using VBA I am assigning several different charts to the same worksheet.  Based on a button the user presses, the correct chart will appear.</p>
<p>So, to change the title of the worksheet and within the chart I assign the title, simply by saying Title = &#8220;Water&#8221;.  Where ever I need that specific text in the code, I use Title.</p>
<p>My question is, how do I subscript in the text of the editor box.  This code changing is not my own.  The previous programmer was able to add superscript within the editor box.  Is there a way to do subscript?</p>
<p>He simply had Title = &#8220;Water m³&#8221;</p>
<p>I am trying to say Title = &#8220;CO2 emissions&#8221;<br />
(I cut and pasted the m3 from the program and the format stays, even in this email.  I cut and pasted from a word document the CO2&#8230; and the 2 was subscript, but didn&#8217;t carry over in this email)</p>
<p>I hope this question makes sense.  I have seen a lot of website resources for formating specific cells, but nothing within the VBA editor.</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
</channel>
</rss>
