<?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: Beginning VBA: Common Objects, Properties, and Methods</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 18:06:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/#comment-33143</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Thu, 26 Jun 2008 19:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=508#comment-33143</guid>
		<description>&lt;p&gt;Andrew:  The Value property is only one property.  If you want almost all the properties, use the Copy method.&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container text default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;text codecolorer&quot;&gt;Workbooks(1).Worksheets(1).Range(&quot;A7:G40&quot;).Copy Workbooks(2).Worksheets(2).Range(&quot;a7&quot;)&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Andrew:  The Value property is only one property.  If you want almost all the properties, use the Copy method.</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container text default">
<div style="white-space: nowrap;" class="text codecolorer">Workbooks(1).Worksheets(1).Range(&#8220;A7:G40&#8243;).Copy Workbooks(2).Worksheets(2).Range(&#8220;a7&#8243;)</div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Craig</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/#comment-33131</link>
		<dc:creator>Andrew Craig</dc:creator>
		<pubDate>Thu, 26 Jun 2008 11:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=508#comment-33131</guid>
		<description>&lt;p&gt;When I do &lt;/p&gt;
&lt;p&gt;Workbooks(1).Worksheets(1).Range(&quot;A7:G40?).Value = _&lt;br&gt;
Workbooks(2).Worksheets(2).Range(&quot;A7:G40?).Value&lt;/p&gt;
&lt;p&gt;it transfers the values of the cells as I would like, but not all of the formatting. I would like the column widths, bold face and similar things to be repeated in the new workbook.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>When I do </p>
<p>Workbooks(1).Worksheets(1).Range(&#8220;A7:G40?).Value = _<br />
Workbooks(2).Worksheets(2).Range(&#8220;A7:G40?).Value</p>
<p>it transfers the values of the cells as I would like, but not all of the formatting. I would like the column widths, bold face and similar things to be repeated in the new workbook.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: holly</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/#comment-30840</link>
		<dc:creator>holly</dc:creator>
		<pubDate>Wed, 20 Feb 2008 22:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=508#comment-30840</guid>
		<description>&lt;p&gt;I am trying to autorun macro in one workbook. How do I &quot;saveas&quot; the workbook without saving the macro from the original workbook? Bear with me as I am learning this.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am trying to autorun macro in one workbook. How do I &#8220;saveas&#8221; the workbook without saving the macro from the original workbook? Bear with me as I am learning this.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/#comment-29209</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 06 Dec 2007 03:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=508#comment-29209</guid>
		<description>&lt;p&gt;What&#039;s wrong with formulas in the target range? e.g., =A1*5&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>What&#8217;s wrong with formulas in the target range? e.g., =A1*5</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: B. J. Andersen</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/#comment-29204</link>
		<dc:creator>B. J. Andersen</dc:creator>
		<pubDate>Wed, 05 Dec 2007 19:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=508#comment-29204</guid>
		<description>&lt;p&gt;I am a newbie Excel 2003 user and would like to know simply how to have Excel multiply each cell in a range of data by 5 and then direct the returns to another column within the same sheet.  Can you help me?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am a newbie Excel 2003 user and would like to know simply how to have Excel multiply each cell in a range of data by 5 and then direct the returns to another column within the same sheet.  Can you help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/#comment-26906</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 31 Aug 2007 01:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=508#comment-26906</guid>
		<description>&lt;p&gt;Simon -&lt;/p&gt;
&lt;p&gt;The first .Value is not redundant. You ought to have one for each referenced range. For most of these default things, the biggest drawbacks to not using them are decreased readability and increased laziness in other things.&lt;/p&gt;
&lt;p&gt;Mike -&lt;/p&gt;
&lt;p&gt;I&#039;m impressed by people who can write a formula in half the characters that I use, but most of my apps are not affected by the performance of my longer formulas, plus I can read them and figure out how they work. So I don&#039;t try to emulate these microformulas. The megaformulas either, which combine everything into a single 1024-character string. I sure don&#039;t mind using an extra column or two, if it helps me trace the numbers and cuts the development time in half. Worksheet space is cheap, and my brainpower and time are limited.&lt;/p&gt;
&lt;p&gt;And while I always reference everything throughly in VBA, I use only simple prefixes on variables, one or two characters only. None of the Dim gszqwertyVariable As Object for me. I&#039;ll use g or m if its scope is global or module, I&#039;ll use s for string, v for variant, i (or j or k) for longs (I don&#039;t use integers), d or n or whatever for other numerics. Controls on a form get three characters (txt, lbl, chk, cmb, lst, ref), and so does the form (frm). In fact, I always create a variable for my forms, Dim frmSettings As FSettings and Set frmSettings = New FSettings, where frmSettings is the variable (the particular instance) and FSettings is the VBComponent.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Simon -</p>
<p>The first .Value is not redundant. You ought to have one for each referenced range. For most of these default things, the biggest drawbacks to not using them are decreased readability and increased laziness in other things.</p>
<p>Mike -</p>
<p>I&#8217;m impressed by people who can write a formula in half the characters that I use, but most of my apps are not affected by the performance of my longer formulas, plus I can read them and figure out how they work. So I don&#8217;t try to emulate these microformulas. The megaformulas either, which combine everything into a single 1024-character string. I sure don&#8217;t mind using an extra column or two, if it helps me trace the numbers and cuts the development time in half. Worksheet space is cheap, and my brainpower and time are limited.</p>
<p>And while I always reference everything throughly in VBA, I use only simple prefixes on variables, one or two characters only. None of the Dim gszqwertyVariable As Object for me. I&#8217;ll use g or m if its scope is global or module, I&#8217;ll use s for string, v for variant, i (or j or k) for longs (I don&#8217;t use integers), d or n or whatever for other numerics. Controls on a form get three characters (txt, lbl, chk, cmb, lst, ref), and so does the form (frm). In fact, I always create a variable for my forms, Dim frmSettings As FSettings and Set frmSettings = New FSettings, where frmSettings is the variable (the particular instance) and FSettings is the VBComponent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Alexander</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/#comment-26892</link>
		<dc:creator>Mike Alexander</dc:creator>
		<pubDate>Thu, 30 Aug 2007 16:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=508#comment-26892</guid>
		<description>&lt;p&gt;I&#039;m with Jon on referencing everything (workbook-sheet-range). I think it helps in reading the code several months down the road.  Plus, I have never gotten into testosterone coding. or &quot;I can build that procedure using 5 characters&quot;.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;m with Jon on referencing everything (workbook-sheet-range). I think it helps in reading the code several months down the road.  Plus, I have never gotten into testosterone coding. or &#8220;I can build that procedure using 5 characters&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Herbert</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/#comment-26891</link>
		<dc:creator>Simon Herbert</dc:creator>
		<pubDate>Thu, 30 Aug 2007 15:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=508#comment-26891</guid>
		<description>&lt;p&gt;&quot;Simon - Use .Value on both range objects:&lt;br&gt;
Range(&quot;B1?).Value = Range(&quot;A1?).Value&quot;&lt;/p&gt;
&lt;p&gt;Jon, the first &quot;.Value&quot; seems redundant as the statement works without it, but I do agree that it is good practice and consider myself educated!&lt;/p&gt;
&lt;p&gt;Are there any pitfalls to excluding it?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&#8220;Simon &#8211; Use .Value on both range objects:<br />
Range(&#8220;B1?).Value = Range(&#8220;A1?).Value&#8221;</p>
<p>Jon, the first &#8220;.Value&#8221; seems redundant as the statement works without it, but I do agree that it is good practice and consider myself educated!</p>
<p>Are there any pitfalls to excluding it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan Pablo Gonzalez</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/#comment-26888</link>
		<dc:creator>Juan Pablo Gonzalez</dc:creator>
		<pubDate>Thu, 30 Aug 2007 14:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=508#comment-26888</guid>
		<description>&lt;p&gt;And Doug,&lt;/p&gt;
&lt;p&gt;I don&#039;t feel those two are oddities, I would rather expect that behavior.  The first one, as you said, is what you would get when doing those steps manually, copy A1, select B1:D10, paste and you get the formula relative to B1.&lt;/p&gt;
&lt;p&gt;The second one is the same as following these steps: Select B1:D10, with B1 being the Active Cell, Type your formula (=A2+1), then press Control + Enter.  The [Sheet2!A1].Formula is just a string, so that line would be the same as&lt;/p&gt;
&lt;p&gt;[Sheet2!B1:D10].Formula = &quot;=A2+1?&lt;/p&gt;
&lt;p&gt;I&#039;ve found that people often trust more the R1C1 notation in VBA to expand the relative references, so they would do instead&lt;/p&gt;
&lt;p&gt;[Sheet2!B1:D10].FormulaR1C1 = &quot;=R[1]C[-1]+1?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>And Doug,</p>
<p>I don&#8217;t feel those two are oddities, I would rather expect that behavior.  The first one, as you said, is what you would get when doing those steps manually, copy A1, select B1:D10, paste and you get the formula relative to B1.</p>
<p>The second one is the same as following these steps: Select B1:D10, with B1 being the Active Cell, Type your formula (=A2+1), then press Control + Enter.  The [Sheet2!A1].Formula is just a string, so that line would be the same as</p>
<p>[Sheet2!B1:D10].Formula = &#8220;=A2+1?</p>
<p>I&#8217;ve found that people often trust more the R1C1 notation in VBA to expand the relative references, so they would do instead</p>
<p>[Sheet2!B1:D10].FormulaR1C1 = &#8220;=R[1]C[-1]+1?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/29/beginning-vba-common-objects-properties-and-methods/#comment-26883</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 30 Aug 2007 12:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=508#comment-26883</guid>
		<description>&lt;p&gt;Doug - &lt;/p&gt;
&lt;p&gt;1. You&#039;re still using a shortcut (square brackets) which can get you into trouble (and the &quot;With ActiveWorkbook&quot; block is redundant if you use the brackets). The only time I use these shortcuts is in the Immediate Window, where it won&#039;t return at some inopportune future time to byte me.&lt;/p&gt;
&lt;p&gt;2. The first statement (Copy Destination) is like using copy-paste via the UI. There is no direct equivalent in the UI for the .formula = .formula statement. It&#039;s not really an oddity, it&#039;s the difference in behavior between copy-paste and assigning formulas directly.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Doug &#8211; </p>
<p>1. You&#8217;re still using a shortcut (square brackets) which can get you into trouble (and the &#8220;With ActiveWorkbook&#8221; block is redundant if you use the brackets). The only time I use these shortcuts is in the Immediate Window, where it won&#8217;t return at some inopportune future time to byte me.</p>
<p>2. The first statement (Copy Destination) is like using copy-paste via the UI. There is no direct equivalent in the UI for the .formula = .formula statement. It&#8217;s not really an oddity, it&#8217;s the difference in behavior between copy-paste and assigning formulas directly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

