<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
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/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>MinhTech.com &#187; Office</title> <atom:link href="http://minhtech.com/category/office/feed/" rel="self" type="application/rss+xml" /><link>http://minhtech.com</link> <description>Yet another technology tutorial blog.</description> <lastBuildDate>Fri, 16 Dec 2011 13:45:47 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Excel VBA Unable to set the Visible property of the PivotItem class</title><link>http://minhtech.com/office/excel-vba-unable-to-set-the-visible-property-of-the-pivotitem-class/</link> <comments>http://minhtech.com/office/excel-vba-unable-to-set-the-visible-property-of-the-pivotitem-class/#comments</comments> <pubDate>Sat, 07 Aug 2010 20:32:00 +0000</pubDate> <dc:creator>Minh</dc:creator> <category><![CDATA[Office]]></category> <guid
isPermaLink="false">http://minhtech.com/?p=853</guid> <description><![CDATA[Chances are AutoSort is enabled if you are getting this error message.]]></description> <content:encoded><![CDATA[<p>In versions of Microsoft Excel before 2007, chances are AutoSort is enabled if you are getting the error message <i>Unable to set the Visible property of the PivotItem class</i> or <i>Method &#8216;Visible&#8217; of object &#8216;PivotItem&#8217; failed</i>. Microsoft has a bulletin, <a
href="http://support.microsoft.com/kb/114822">KB114822</a>, for it. Basically only contiguous PivotItems in a PivotField can be hidden or unhidden. This appears to be fixed in Microsoft Excel 2007 and later.</p><h3>ManualUpdate and AutoSort Workaround:</h3><p
class="code">Dim mySheet As Worksheet<br
/> Dim myTable As PivotTable, myField As PivotField, myItem As PivotItem<br/><br
/> Set mySheet = Sheets(1)<br
/> Set myTable = mySheet.PivotTables(1)<br
/> Set myField = myTable.PivotFields(1)<br/><br
/> For Each myItem In myField.PivotItems<br
/> &#160;&#160;&#160;&#160;<span
class="input">myField.AutoSort xlManual, myField.SourceName</span><br
/> &#160;&#160;&#160;&#160;<span
class="input">myTable.ManualUpdate = True</span><br/><br
/> &#160;&#160;&#160;&#160;myItem.Visible = True<br/><br
/> &#160;&#160;&#160;&#160;<span
class="input">myTable.ManualUpdate = False</span><br
/> &#160;&#160;&#160;&#160;<span
class="input">myField.AutoSort xlAscending, myField.SourceName</span><br
/> Next myItem</p><p>The workaround is to temporarily enable ManualUpdate in the PivotTable and disable AutoSort in the PivotField.  Download <a
href="http://minhtech.com/files/pivot.xls">pivot.xls</a> for a sample of the error and the workaround.</p> ]]></content:encoded> <wfw:commentRss>http://minhtech.com/office/excel-vba-unable-to-set-the-visible-property-of-the-pivotitem-class/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Excel Validation with Dropdown Lists</title><link>http://minhtech.com/office/excel-validation-dropdown-lists/</link> <comments>http://minhtech.com/office/excel-validation-dropdown-lists/#comments</comments> <pubDate>Mon, 02 Mar 2009 02:26:03 +0000</pubDate> <dc:creator>Minh</dc:creator> <category><![CDATA[Office]]></category> <guid
isPermaLink="false">http://minhtech.com/?p=341</guid> <description><![CDATA[Here is how to setup Excel dropdown lists to improve data integrity during data entry.]]></description> <content:encoded><![CDATA[<p>Here is how to setup Excel dropdown lists to improve data integrity during data entry.</p><p>Validation improves data integrity especially when you need entry to be consistent.  For example, the value &#8220;United States of America&#8221; could also be entered as:  United States, US, USA, America, and more.  Consistency improves the results of many tasks such as sorting, grouping, and various aggregate functions.</p><h3>Setup a Named Ranged:</h3><p>Open Microsoft Excel, activate <strong>Sheet2</strong>, and create a list of colors. Select the cells, and then go to <em>Insert</em> > <em>Name</em> > <em>Define</em> (shortcut: ctrl + F3). In the Define Name dialog, let&#8217;s name the range &#8220;ListColors.&#8221;</p><p><img
src="http://minhtech.com/wp-content/uploads/2009/03/excel01.jpg" alt="Excel" title="Excel" width="600" height="445" class="size-full wp-image-416" /></p><h3>Create the Validation Rule:</h3><p>Activate <strong>Sheet1</strong>, select a range of cells for validation, and then go to <em>Data</em> > <em>Validation</em>. In the Data Validation dialog, select the <strong>Settings</strong> tab, and then change the <strong>Allow</strong> combobox to &#8220;List&#8221; and enter &#8220;=ListColors&#8221; for the <strong>Source</strong>. Make sure <strong>In-cell dropdown</strong> is checked.</p><p><img
src="http://minhtech.com/wp-content/uploads/2009/03/excel02.jpg" alt="Excel" title="Excel" width="600" height="445" class="size-full wp-image-417" /></p><h3>Test It Out:</h3><p>Each selected cell is now embedded with a combobox. Items appear in the list as they appear in the named range, including sort order. Users may key in a value or select an item from the dropdown. An error message appears if the user attempts to enter a value not listed in your named range.</p><p><img
src="http://minhtech.com/wp-content/uploads/2009/03/excel03.jpg" alt="Excel" title="Excel" width="600" height="445" class="size-full wp-image-419" /></p><h3>Finally, Hide Your Named Ranges:</h3><p>Activate <strong>Sheet2</strong>, and then go to <em>Format</em> > <em>Sheet</em> > <em>Hide</em>.</p> ]]></content:encoded> <wfw:commentRss>http://minhtech.com/office/excel-validation-dropdown-lists/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
