<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6761332894277119090</id><updated>2024-11-08T22:38:24.285+07:00</updated><category term="Excel VBA Macro Examples"/><category term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA Macro Programming Tutorials</title><subtitle type='html'>This blog is about programming in Visual Basic For Applications (Excel VBA Macro programming), Excel VBA Macro tutorial, and Excel VBA Macro examples.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-1994906677357312699</id><published>2015-11-07T19:17:00.001+07:00</published><updated>2015-11-07T19:25:29.667+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: How To Delete Entire Row Or Entire Column</title><content type='html'>&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;On &lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;previous post, &lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;I&#39;ve&lt;/span&gt; explained how to &lt;a href=&quot;http://vbatutor.blogspot.com/2015/11/vba-how-to-delete-cell-shift-up-and.html&quot;&gt;delete cells &lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;shift to left and up&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;, now &lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;i will explai&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;n how to delete entire row or entire column&lt;/span&gt;&lt;/span&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;To delete entire row&lt;/span&gt;: &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Sub deleteShiftLeft()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thisworkbook.Activesheet.Range(&quot;B10&quot;).&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;EntireRow.Delete&lt;/span&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;To delete entire column&lt;/span&gt;: &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Sub deleteShiftUp()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thisworkbook.Activesheet.Range(&quot;B10&quot;).&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Entire&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Column&lt;/span&gt;.Delete&lt;/span&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;That&#39;s all. Fin. &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/1994906677357312699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2015/11/on-previous-post-ive-explained-how-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/1994906677357312699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/1994906677357312699'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2015/11/on-previous-post-ive-explained-how-to.html' title='Excel VBA: How To Delete Entire Row Or Entire Column'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-4691953512205291040</id><published>2015-11-07T19:10:00.000+07:00</published><updated>2015-11-07T19:25:37.898+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: How To Delete Cell Shift Up and Shift Left</title><content type='html'>&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;It&#39;s very simple to delete cell using VBA, we can use Delete method. This is an example how to do it:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Delete cell shift to left: &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Sub deleteShiftLeft()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thisworkbook.Activesheet.Range(&quot;B10&quot;).Delete Shift:=xlToLeft&lt;br /&gt;End Sub&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Delete cell shift up: &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Sub deleteShiftUp()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thisworkbook.Activesheet.Range(&quot;B10&quot;).Delete Shift:=xlUp&lt;br /&gt;End Sub&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Fin. &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/4691953512205291040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2015/11/vba-how-to-delete-cell-shift-up-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/4691953512205291040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/4691953512205291040'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2015/11/vba-how-to-delete-cell-shift-up-and.html' title='Excel VBA: How To Delete Cell Shift Up and Shift Left'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-8384012498624937892</id><published>2015-11-07T17:53:00.000+07:00</published><updated>2015-11-07T19:25:45.298+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: How to check whether a sheet exist or not</title><content type='html'>&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Sometimes we need to check whether a sheet exist or not to avoid run time error. Below is a simple function to do that task:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Function isSheetExist(ByVal workbookName As String, ByVal sheetName As String) As Boolean&lt;br /&gt;Dim ws As Worksheet, ss&lt;br /&gt;Dim vbR As Boolean&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vbR = False&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set ss = Workbooks(workbookName).Worksheets&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each ws In ss&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (ws.Name = sheetName) Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vbR = True&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit For&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next ws&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; isSheetExist = vbR&lt;br /&gt;End Function&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;And this is an example to use that function:&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub FunctionTest()
 If &lt;/code&gt;&lt;code&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;isSheetExist&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;(ThisWorkbook.Name, &quot;Sheet1&quot;) = False Then
     MsgBox &quot;Sheet is not exist.&quot;
 Else
     MsgBox &quot;Sheet is exist.&quot;
 End If
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;I hope this example help you.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/8384012498624937892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2015/11/vba-how-to-check-whether-sheet-exist-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/8384012498624937892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/8384012498624937892'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2015/11/vba-how-to-check-whether-sheet-exist-or.html' title='Excel VBA: How to check whether a sheet exist or not'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-297673853888711805</id><published>2015-11-07T11:39:00.003+07:00</published><updated>2015-11-09T20:35:13.008+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: Connect to Microsoft Access Database (MDB) using ADODB</title><content type='html'>&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:OfficeDocumentSettings&gt;
  &lt;o:AllowPNG/&gt;
 &lt;/o:OfficeDocumentSettings&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:TrackMoves/&gt;
  &lt;w:TrackFormatting/&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:DoNotPromoteQF/&gt;
  &lt;w:LidThemeOther&gt;IN&lt;/w:LidThemeOther&gt;
  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
  &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
   &lt;w:SplitPgBreakAndParaMark/&gt;
   &lt;w:EnableOpenTypeKerning/&gt;
   &lt;w:DontFlipMirrorIndents/&gt;
   &lt;w:OverrideTableStyleHps/&gt;
  &lt;/w:Compatibility&gt;
  &lt;m:mathPr&gt;
   &lt;m:mathFont m:val=&quot;Cambria Math&quot;/&gt;
   &lt;m:brkBin m:val=&quot;before&quot;/&gt;
   &lt;m:brkBinSub m:val=&quot;--&quot;/&gt;
   &lt;m:smallFrac m:val=&quot;off&quot;/&gt;
   &lt;m:dispDef/&gt;
   &lt;m:lMargin m:val=&quot;0&quot;/&gt;
   &lt;m:rMargin m:val=&quot;0&quot;/&gt;
   &lt;m:defJc m:val=&quot;centerGroup&quot;/&gt;
   &lt;m:wrapIndent m:val=&quot;1440&quot;/&gt;
   &lt;m:intLim m:val=&quot;subSup&quot;/&gt;
   &lt;m:naryLim m:val=&quot;undOvr&quot;/&gt;
  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; DefUnhideWhenUsed=&quot;false&quot;
  DefSemiHidden=&quot;false&quot; DefQFormat=&quot;false&quot; DefPriority=&quot;99&quot;
  LatentStyleCount=&quot;371&quot;&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;0&quot; QFormat=&quot;true&quot; Name=&quot;Normal&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Normal Indent&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;footnote text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;annotation text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;header&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;footer&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index heading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;35&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;caption&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;table of figures&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;envelope address&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;envelope return&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;footnote reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;annotation reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;line number&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;page number&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;endnote reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;endnote text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;table of authorities&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;macro&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;toa heading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Bullet&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Number&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Bullet 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Bullet 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Bullet 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Bullet 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Number 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Number 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Number 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Number 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;10&quot; QFormat=&quot;true&quot; Name=&quot;Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Closing&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Signature&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;Default Paragraph Font&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text Indent&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Continue&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Continue 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Continue 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Continue 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Continue 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Message Header&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;11&quot; QFormat=&quot;true&quot; Name=&quot;Subtitle&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Salutation&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Date&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text First Indent&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text First Indent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Note Heading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text Indent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text Indent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Block Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Hyperlink&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;FollowedHyperlink&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;22&quot; QFormat=&quot;true&quot; Name=&quot;Strong&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;20&quot; QFormat=&quot;true&quot; Name=&quot;Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Document Map&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Plain Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;E-mail Signature&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Top of Form&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Bottom of Form&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Normal (Web)&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Acronym&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Address&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Cite&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Code&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Definition&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Keyboard&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Preformatted&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Sample&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Typewriter&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Variable&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Normal Table&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;annotation subject&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;No List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Outline List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Outline List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Outline List 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Simple 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Simple 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Simple 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Classic 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Classic 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Classic 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Classic 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Colorful 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Colorful 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Colorful 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Columns 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Columns 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Columns 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Columns 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Columns 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table 3D effects 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table 3D effects 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table 3D effects 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Contemporary&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Elegant&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Professional&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Subtle 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Subtle 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Web 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Web 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Web 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Balloon Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;Table Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Theme&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; Name=&quot;Placeholder Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; QFormat=&quot;true&quot; Name=&quot;No Spacing&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; Name=&quot;Revision&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;34&quot; QFormat=&quot;true&quot;
   Name=&quot;List Paragraph&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;29&quot; QFormat=&quot;true&quot; Name=&quot;Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;30&quot; QFormat=&quot;true&quot;
   Name=&quot;Intense Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;19&quot; QFormat=&quot;true&quot;
   Name=&quot;Subtle Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;21&quot; QFormat=&quot;true&quot;
   Name=&quot;Intense Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;31&quot; QFormat=&quot;true&quot;
   Name=&quot;Subtle Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;32&quot; QFormat=&quot;true&quot;
   Name=&quot;Intense Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;33&quot; QFormat=&quot;true&quot; Name=&quot;Book Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;37&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;Bibliography&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;TOC Heading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;41&quot; Name=&quot;Plain Table 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;42&quot; Name=&quot;Plain Table 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;43&quot; Name=&quot;Plain Table 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;44&quot; Name=&quot;Plain Table 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;45&quot; Name=&quot;Plain Table 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;40&quot; Name=&quot;Grid Table Light&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot; Name=&quot;Grid Table 1 Light&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot; Name=&quot;Grid Table 6 Colorful&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot; Name=&quot;Grid Table 7 Colorful&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot; Name=&quot;List Table 1 Light&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot; Name=&quot;List Table 6 Colorful&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot; Name=&quot;List Table 7 Colorful&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 6&quot;/&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0in 5.4pt 0in 5.4pt;
 mso-para-margin-top:0in;
 mso-para-margin-right:0in;
 mso-para-margin-bottom:8.0pt;
 mso-para-margin-left:0in;
 line-height:107%;
 mso-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,sans-serif;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;
 mso-fareast-language:EN-US;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;First, you have to enable
Microsoft ActiveX Data Object Library. Follow this instruction:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;1. Open Visual Basic for
Application, click Tools, then click Add References&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=6761332894277119090&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=6761332894277119090&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=6761332894277119090&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=6761332894277119090&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzv4Aro6DxoIj9v4E4nsyGEx7mJQ_4dG1uNV9cTmxho2hfPT8DqrtlbOoTFybrqhUQRfPuByIqHI9ifYrYJ8Bxetu2wnGKAY4Z59gtpVQaTsfXKiv82X7cNcooE23tUDXFo9aCPAkD-T8/s1600/i01.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzv4Aro6DxoIj9v4E4nsyGEx7mJQ_4dG1uNV9cTmxho2hfPT8DqrtlbOoTFybrqhUQRfPuByIqHI9ifYrYJ8Bxetu2wnGKAY4Z59gtpVQaTsfXKiv82X7cNcooE23tUDXFo9aCPAkD-T8/s1600/i01.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;2. Search for &amp;nbsp; Microsoft
ActiveX Data Object Library&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=6761332894277119090&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=6761332894277119090&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_eV7bLHfl4Xo345JQggbQVf4yg8_8zffLDBxuQ9PWdL1e5LCXg2VBwoqBi9sEjat4Ur_ZqMVQz-8GHTnmQfWnU7xHabiNZWdc-N_eN45aVbYP_Vey3kwBnDGkQHAIwb9-LLHn8s2k1qE/s1600/i02.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;258&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_eV7bLHfl4Xo345JQggbQVf4yg8_8zffLDBxuQ9PWdL1e5LCXg2VBwoqBi9sEjat4Ur_ZqMVQz-8GHTnmQfWnU7xHabiNZWdc-N_eN45aVbYP_Vey3kwBnDGkQHAIwb9-LLHn8s2k1qE/s320/i02.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=6761332894277119090&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=6761332894277119090&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;This is an example code to connect to ADODB:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Private Sub CommandButton1_Click()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Dim adoConn As New ADODB.Connection&lt;br /&gt;Dim adoRS As New ADODB.Recordset&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adoConn.ConnectionString = &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.mdb; Persist Security Info=False&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adoConn.Open&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adoRS.Open &quot;SELECT &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;COUNT&lt;/span&gt;([&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;employee_id&lt;/span&gt;]) AS &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;empID&lt;/span&gt; FROM [Table1]&quot;, adoConn, adOpenKeyset, adLockOptimistic&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveSheet.Range(&quot;A1&quot;).Value = adoRS!&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;empID&lt;/span&gt; &amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If adoRS.State = adStateOpen Then adoRS.Close&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If adoConn.State = adStateOpen Then adoConn.Close&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;End Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/297673853888711805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/297673853888711805'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2015/11/vba-connect-to-microsoft-access.html' title='Excel VBA: Connect to Microsoft Access Database (MDB) using ADODB'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzv4Aro6DxoIj9v4E4nsyGEx7mJQ_4dG1uNV9cTmxho2hfPT8DqrtlbOoTFybrqhUQRfPuByIqHI9ifYrYJ8Bxetu2wnGKAY4Z59gtpVQaTsfXKiv82X7cNcooE23tUDXFo9aCPAkD-T8/s72-c/i01.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-1338073315548068268</id><published>2009-12-27T10:16:00.000+07:00</published><updated>2015-11-07T19:25:53.226+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: Find And Replace String Using VBA Code</title><content type='html'>There are several ways to replace string using VBA code,&amp;nbsp; by looping each cell or by using VBA &lt;i&gt;Replace&lt;/i&gt; function.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s say that we want to replace &quot;Macrosoft Excel&quot; with &quot;Microsoft Excel&quot; from A1 through A500.&lt;br /&gt;
&lt;br /&gt;
This first example loops from A1 through A500 and replace &quot;Macrosoft Excel&quot; with &quot;Microsoft Excel&quot;.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Sub Find_Replace1()
    Dim I As Integer
    Dim SFind As String
    Dim SReplace As String
    
    SFind = &quot;Macrosoft Excel&quot;
    SReplace = &quot;Microsoft Excel&quot;
    For I = 1 To 500
        If Cells(I, 1).Value = SFind Then
            Cells(I, 1).Value = SReplace
        End If
    Next I
End Sub
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
The following example is more efficient than previous example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Sub &lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Find_Replace2&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span style=&quot;color: #990000;&quot;&gt;()&lt;/span&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;    Dim SFind As String
    Dim SReplace As String
    
    SFind = &quot;Macrosoft Excel&quot;
    SReplace = &quot;Microsoft Excel&quot;

    Range(&quot;A1:A500&quot;).Replace _
        What:=SFind, Replacement:=SReplace, _
    LookAt:=xlWhole, MatchCase:=False
&lt;/span&gt;&lt;span style=&quot;color: #990000;&quot;&gt;End Sub&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
If you to make the search case sensitive you can change the &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;MatchCase&lt;/span&gt; property to &lt;span style=&quot;font-style: italic;&quot;&gt;true&lt;/span&gt;. And also if you want to replace data that contain part of the searched data you can change the &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;LookAt &lt;/span&gt;property to &lt;span style=&quot;font-style: italic;&quot;&gt;xlPart&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3366ff; font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-function.html&quot;&gt;Excel VBA Macro Examples: Function Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/range-objects.html&quot;&gt;Excel VBA Macro Tutorial: Range Objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCA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vcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/1338073315548068268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/1338073315548068268'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/12/find-and-replace-string-using-vba-code.html' title='Excel VBA: Find And Replace String Using VBA Code'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-81972484499077006</id><published>2009-12-12T15:16:00.009+07:00</published><updated>2015-11-07T19:26:12.538+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: Date Calculations</title><content type='html'>To add or subtract an interval (a relative date) from a date, we could use &lt;span style=&quot;font-style: italic;&quot;&gt;DateAdd&lt;/span&gt; function. The syntax is:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;DateAdd(&lt;/span&gt;&lt;i style=&quot;font-style: italic; font-weight: bold;&quot;&gt;interval, number, date&lt;/i&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;T&quot;&gt;
The &lt;b&gt;DateAdd&lt;/b&gt; function syntax has these named arguments:&lt;/div&gt;
&lt;table cellpadding=&quot;4&quot; cellspacing=&quot;4&quot; cols=&quot;2&quot;&gt;&lt;tbody&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;th style=&quot;text-align: left;&quot; width=&quot;19%&quot;&gt;Part&lt;/th&gt; &lt;th style=&quot;text-align: left;&quot; width=&quot;81%&quot;&gt;Description&lt;/th&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;19%&quot;&gt;&lt;b&gt;&lt;i&gt;interval&lt;/i&gt;&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;81%&quot;&gt;Required. String  expression that is the interval of time you want to add.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;19%&quot;&gt;&lt;b&gt;&lt;i&gt;number&lt;/i&gt;&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;81%&quot;&gt;Required. Numeric  expression that is the number of intervals you want to add. It can be  positive (to get dates in the future) or negative (to get dates in the  past).&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;19%&quot;&gt;&lt;b&gt;&lt;i&gt;date&lt;/i&gt;&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;81%&quot;&gt;Required. &lt;b&gt;Variant&lt;/b&gt; (&lt;b&gt;Date&lt;/b&gt;) or literal  representing date to which the interval is added.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;FIXP&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;Settings&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;T&quot;&gt;
The &lt;b&gt;&lt;i&gt;interval&lt;/i&gt;&lt;/b&gt; argument has these settings:&lt;/div&gt;
&lt;table cellpadding=&quot;4&quot; cellspacing=&quot;4&quot; cols=&quot;2&quot;&gt;&lt;tbody&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;th style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;Setting&lt;/th&gt; &lt;th style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;Description&lt;/th&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;yyyy&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;Year&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;q&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;Quarter&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;m&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;Month&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;y&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;Day of year&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;d&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;Day&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;w&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;Weekday&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;ww&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;Week&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;h&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;Hour&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;n&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;Minute&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;s&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;50%&quot;&gt;Second&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
The following example add two months to October 31, 2009:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;MsgBox DateAdd(&quot;m&quot;,2,&quot;31-Jan-09&quot;))&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3366ff; font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/msgbox-function.html&quot;&gt;The MsgBox Function&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/range-objects.html&quot;&gt;Excel VBA Macro Tutorial: Range Objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAxToy0g66wx87Gg7fpUThgKH4sIjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIOFipa2OH0xSAgZDOR6dIu4EE409XK3LVwH22uwkCUgRP8Ozjs7fOA41PzdC/7mcCOufJFOhFRID34XIXyTQrjd/5a4Z1f8qEESlKoWZQRbZTP3a19bg1YPBPj0tJuZ+mC3zhV3rxqICqKlPR6C9z2/13TNT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Ib3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/81972484499077006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/12/date-calculations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/81972484499077006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/81972484499077006'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/12/date-calculations.html' title='Excel VBA: Date Calculations'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-1283170026382347007</id><published>2009-03-18T08:41:00.005+07:00</published><updated>2015-11-07T19:26:22.467+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: Determining whether a path exists</title><content type='html'>To check whether a path exists or not, we can use Excel VBA&#39;s &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;GetAttr&lt;/span&gt; function. The following function returns True if a specified path exists, and return False otherwise:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Function isPathExist(ByVal pathname As String) As Boolean
 On Error Resume Next
 isPathExist = GetAttr(pathname) And vbDirectory = vbDirectory
End Function&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/03/determining-whether-file-exists-or-not.html&quot;&gt;Determinig whether a file exists&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAxToy0g66wx87Gg7fpUThgKH4sIjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIOFipa2OH0xSAgZDOR6dIu4EE409XK3LVwH22uwkCUgRP8Ozjs7fOA41PzdC/7mcCOufJFOhFRID34XIXyTQrjd/5a4Z1f8qEESlKoWZQRbZTP3a19bg1YPBPj0tJuZ+mC3zhV3rxqICqKlPR6C9z2/13TNTvqZTx0SwNxiK7uDzUIReMX8ZnncKXzsOyV6yE3B0TFk8cY4GQQfqgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1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b3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/1283170026382347007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/03/determining-whether-path-exists.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/1283170026382347007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/1283170026382347007'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/03/determining-whether-path-exists.html' title='Excel VBA: Determining whether a path exists'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-6655196528032601169</id><published>2009-03-10T11:55:00.024+07:00</published><updated>2015-11-07T19:26:31.984+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: Determining Whether A File Exists Or Not</title><content type='html'>There are several ways to check whether a file exists. By using Microsoft Excel VBA statements and functions, or by using &lt;span style=&quot;font-style: italic;&quot;&gt;FileSystemObject&lt;/span&gt; (Microsoft Scripting Library). The following function returns True if a particular file exist, and return False if file does&#39;nt exist. This function uses &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Dir&lt;/span&gt; function to check whether a file exists or not.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Function isFileExist(ByVal fname As String) As Boolean
 isFileExist = False
 If Dir(fname) &amp;lt;&amp;gt; &quot;&quot; Then isFileExist = True
End Function&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Here&#39;s example how to use the function above:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub FunctionTest()
 If isFileExist(&quot;D:\SomeFile.txt&quot;) = False Then
     MsgBox &quot;File not exists.&quot;
 Else
     MsgBox &quot;File already exist.&quot;
 End If
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
The next function do exactly as previous function, but this function uses &lt;span style=&quot;font-style: italic;&quot;&gt;FileSystemObject&lt;/span&gt; to check whether a file exist:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;Function isFileExist2(ByVal fname As String) As Boolean&lt;/span&gt;
&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;    Set fs = CreateObject(&quot;Scripting.FileSystemObject&quot;)&lt;/span&gt;
&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;    &lt;/span&gt;
&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;    isFileExist2 = fs.FileExists(fname)&lt;/span&gt;
&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;End Function&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
FIN.&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;&lt;br /&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/range-objects.html&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/msgbox-function.html&quot;&gt;The MsgBox Function&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1N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wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/6655196528032601169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/03/determining-whether-file-exists-or-not.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/6655196528032601169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/6655196528032601169'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/03/determining-whether-file-exists-or-not.html' title='Excel VBA: Determining Whether A File Exists Or Not'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-525037083806304988</id><published>2009-03-05T12:59:00.009+07:00</published><updated>2015-11-07T19:26:42.826+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: Cell Alignment</title><content type='html'>In Excel VBA macro we can control the alignment of cell, both horizontally and vertically. To change alignment, we can use the following properties of the &lt;span style=&quot;font-style: italic;&quot;&gt;Range&lt;/span&gt; object:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;HorizontalAlignment&lt;/span&gt;. Set to &lt;span style=&quot;font-style: italic;&quot;&gt;xlLeft&lt;/span&gt;, &lt;span style=&quot;font-style: italic;&quot;&gt;xlCenter&lt;/span&gt;, &lt;span style=&quot;font-style: italic;&quot;&gt;xlRight, xlDistributed&lt;/span&gt;, or&lt;span style=&quot;font-style: italic;&quot;&gt; xlJustify&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;VerticalAlignment&lt;/span&gt;. Set to &lt;span style=&quot;font-style: italic;&quot;&gt;xlTop&lt;/span&gt;, &lt;span style=&quot;font-style: italic;&quot;&gt;xlCenter&lt;/span&gt;, &lt;span style=&quot;font-style: italic;&quot;&gt;xlBottom&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;, xlDistributed&lt;/span&gt;, or&lt;span style=&quot;font-style: italic;&quot;&gt; xlJustify&lt;/span&gt;.&lt;/li&gt;
&lt;/ul&gt;
Following example sets horizontal alignment to justify:&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;color: #990000;&quot;&gt;Worksheets(&quot;Sheet1&quot;).Range(&quot;A1:D5&quot;).HorizontalAlignment = xlJustify&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 51 , 255); font-weight: bold;&quot;&gt;Related Post:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.blogger.com/post-edit.g?blogID=6761332894277119090&amp;amp;postID=3352431806855275698&quot;&gt;Number Formatting In Excel VBA Macro&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.blogger.com/post-edit.g?blogID=6761332894277119090&amp;amp;postID=3866510910020122085&quot;&gt;Changing Row And Column Size&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/03/font-formatting.html&quot;&gt;Font Formatting&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAxToy0g66wx87Gg7fpUThgKH4sIjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIOFipa2OH0xSAgZDOR6dIu4EE409XK3LVwH22uwkCUgRP8Ozjs7fOA41PzdC/7mcCOufJFOhFRID34XIXyTQrjd/5a4Z1f8qEESlKoWZQRbZTP3a19bg1YPBPj0tJuZ+mC3zhV3rxqICqKlPR6C9z2/13TNTvqZTx0SwNxiK7uDzUIReMX8ZnncKXzsOyV6yE3B0TFk8cY4GQQfqgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1U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IbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/525037083806304988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/03/data-alignment.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/525037083806304988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/525037083806304988'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/03/data-alignment.html' title='Excel VBA: Cell Alignment'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-832036067142355945</id><published>2009-03-03T17:53:00.018+07:00</published><updated>2015-11-07T19:26:52.021+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: Font Formatting</title><content type='html'>When we working in Excel, if we want to changes font properties we may use Font tab in the Format Cells dialog box. In Excel VBA, we control the font&#39;s appearance by the Font object. The Font object have several properties that correspond to various aspects of the font&#39;s appearance. Here are several list of font&#39;s properties:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; str=&quot;&quot; style=&quot;border-collapse: collapse; width: 1106pt;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 63pt;&quot; width=&quot;84&quot;&gt;&lt;/col&gt;  &lt;col style=&quot;width: 1043pt;&quot; width=&quot;1391&quot;&gt;&lt;/col&gt;  &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl24&quot; height=&quot;17&quot; style=&quot;font-weight: bold; height: 12.75pt; width: 63pt;&quot; width=&quot;84&quot;&gt;Property&lt;/td&gt;   &lt;td class=&quot;xl24&quot; style=&quot;border-left: medium none; font-weight: bold; width: 1043pt;&quot; width=&quot;1391&quot;&gt;Description&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;Name&lt;/td&gt;   &lt;td class=&quot;xl25&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;&lt;div border=&quot;0&quot; src=&quot;mk:@msitstore:msohlp11.chm::/html/bluedrop.gif&quot;&gt;
The name   of the font.&lt;/div&gt;
&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;Bold&lt;/td&gt;   &lt;td class=&quot;xl25&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;True if the font is   bold. Read/write Variant.&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;Italic&lt;/td&gt;   &lt;td class=&quot;xl25&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;True if the font   style is italic. Read/write Boolean.&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;Underline&lt;/td&gt;   &lt;td class=&quot;xl25&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;Returns or sets the   type of underline applied to the font.&lt;br /&gt;
Can be set to xlUnderlineStyleNone,   xlUnderlineStyleSingle,&lt;br /&gt;
xlUnderlineStyleDouble,   xlUnderlineStyleSingleAccounting,&lt;br /&gt;
xlUnderlineStyleDoubleAccounting.   Read/write Variant.&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;Size&lt;/td&gt;   &lt;td class=&quot;xl25&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;Returns or sets the   size of the font. Read/write Variant.&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;Subscript&lt;/td&gt;   &lt;td class=&quot;xl25&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;True if the font is   formatted as subscript. False by default. Read/write Variant.&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;Superscript&lt;/td&gt;   &lt;td class=&quot;xl25&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;True if the font is   formatted as superscript; False by default. Read/write Variant.&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;Strikethrough&lt;/td&gt;   &lt;td class=&quot;xl25&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;True if the font is   struck through with a horizontal line. Read/write Boolean.&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
This example sets font name of range A1:B4 to Tahoma in ActiveSheet in ActiveWorkbook:&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;color: #990000;&quot;&gt;ActiveWorkbook.ActiveSheet.Range(&quot;A1:B4&quot;).Font.Name = &quot;Tahoma&quot;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Color property&lt;/span&gt; uses an RGB value, which identifies a color in terms of its red,  green,&lt;br /&gt;
and blue components. To set this property, use the RGB function:&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;color: #006600;&quot;&gt;RGB(r, g, b)&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The next example sets font color of range B4  to Blue in ActiveSheet in ActiveWorkbook:&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;color: #990000;&quot;&gt;ActiveWorkbook.ActiveSheet.Range(&quot;A1:B4&quot;).Font.Color = RGB(0, 0, 255)&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
We can also use predefined constants to sets font color, they are vbBlack, vbRed, vbGreen, vbYellow, vbBlue, vbMagenta, vbCyan, and vbWhite.&lt;br /&gt;
&lt;br /&gt;
This example do exactly as previous example:&lt;br /&gt;
&lt;code style=&quot;color: #990000;&quot;&gt;&lt;br /&gt;ActiveWorkbook.ActiveSheet.Range(&quot;A1:B4&quot;).Font.Color = vbBlue&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 51 , 255); font-weight: bold;&quot;&gt;Related Post:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=6761332894277119090&amp;amp;postID=3352431806855275698&quot;&gt;Number Formatting In Excel VBA Macro&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=6761332894277119090&amp;amp;postID=3866510910020122085&quot;&gt;Changing Row And Column Size&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwM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BMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/832036067142355945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/03/font-formatting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/832036067142355945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/832036067142355945'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/03/font-formatting.html' title='Excel VBA: Font Formatting'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-3866510910020122085</id><published>2009-03-02T14:06:00.007+07:00</published><updated>2015-11-07T19:27:01.453+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: Changing Row and Column Size</title><content type='html'>Sometimes, in Microsoft Excel we need to change width of columns or height of rows in a worksheet to accomodate data they contain. In Excel Visual Basic for Application (VBA macro), to change columns width we can use &lt;span style=&quot;font-style: italic;&quot;&gt;ColumnWidth&lt;/span&gt; property. Following excel macro code sets width of column C in &quot;Sheet1&quot; worksheet to 24:&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;color: #990000;&quot;&gt;Sheets(&quot;Sheet1&quot;).Columns(&quot;C&quot;).ColumnWidth = 24&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
To change columns width to fit data in columns, we can use &lt;span style=&quot;font-style: italic;&quot;&gt;AutoFit &lt;/span&gt;method. The following example uses &lt;span style=&quot;font-style: italic;&quot;&gt;AutoFit &lt;/span&gt;method to change the size of C:F in the &quot;Sheet1&quot; worksheet:&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;color: #990000;&quot;&gt;Sheets(&quot;Sheet1&quot;).Columns(&quot;C:F&quot;).AutoFit&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-style: italic;&quot;&gt;RowHeight&lt;/span&gt; property is used to change rows height of a range. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;color: #990000;&quot;&gt;Sheets(&quot;Sheet1&quot;).Rows(2).RowHeight = 56&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 51 , 255); font-weight: bold;&quot;&gt;Related Post:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/excel-vba-macro-example-protect.html&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=6761332894277119090&amp;amp;postID=3352431806855275698&quot;&gt;Number Formatting In Excel VBA Macro&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAxToy0g66wx87Gg7fpUThgKH4sIjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIOFipa2OH0xSAgZDOR6dIu4EE409XK3LVwH22uwkCUgRP8Ozjs7fOA41PzdC/7mcCOufJFOhFRID34XIXyTQrjd/5a4Z1f8qEESlKoWZQRbZTP3a19bg1YPBPj0tJuZ+mC3zhV3rxqICqKlPR6C9z2/13TNTvqZTx0SwNxiK7uDzUIReMX8ZnncKXzsOyV6yE3B0TFk8cY4GQQfqgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQ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QTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/3866510910020122085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/03/changing-row-and-column-size.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/3866510910020122085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/3866510910020122085'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/03/changing-row-and-column-size.html' title='Excel VBA: Changing Row and Column Size'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-3352431806855275698</id><published>2009-03-01T07:34:00.007+07:00</published><updated>2015-11-07T19:27:13.469+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: Number Formatting in Excel VBA Macro</title><content type='html'>Number formatting controls how numbers on cells are displayed, it has no effect on cells that contain text. In Microsoft Excel, if we want to apply number formatting we can use Format Cells dialog box. To format numbers in VBA macro we can use the &lt;span style=&quot;font-style: italic;&quot;&gt;NumberFormat&lt;/span&gt; property. Following are some number formatting codes to format numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Number Formatting Codes&lt;/span&gt;&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; str=&quot;&quot; style=&quot;border-collapse: collapse; height: 180px; width: 571px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;font-weight: bold; width: 47pt;&quot; width=&quot;63&quot;&gt;&lt;/col&gt;  &lt;col style=&quot;font-weight: bold; width: 98pt;&quot; width=&quot;130&quot;&gt;&lt;/col&gt;  &lt;col style=&quot;font-weight: bold; width: 68pt;&quot; width=&quot;90&quot;&gt;&lt;/col&gt;  &lt;col style=&quot;font-weight: bold; width: 129pt;&quot; width=&quot;172&quot;&gt;&lt;/col&gt;  &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl22&quot; height=&quot;17&quot; style=&quot;height: 12.75pt; width: 47pt;&quot; width=&quot;63&quot;&gt;Character&lt;/td&gt;   &lt;td class=&quot;xl22&quot; style=&quot;border-left: medium none; width: 98pt;&quot; width=&quot;130&quot;&gt;Meaning&lt;/td&gt;   &lt;td class=&quot;xl22&quot; style=&quot;border-left: medium none; width: 68pt;&quot; width=&quot;90&quot;&gt;Code example&lt;/td&gt;   &lt;td class=&quot;xl22&quot; style=&quot;border-left: medium none; width: 129pt;&quot; width=&quot;172&quot;&gt;Format example&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;#&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;Significant digit&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;##.#&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;10.78 displays as   10.9&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; str=&quot;&#39;0&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;0&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;Nonsignificant 0&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;#.00&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;5.4 displays as 5.40&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;.&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;Decimal point&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;##.##&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;14.55 displays as   14.55&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;$&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;Currency symbol&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;$#.##&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;56.78 displays as   $56.78&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;%&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;Percent symbol&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;#.#%&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;0.075 displays as 7.5%&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height=&quot;17&quot; style=&quot;height: 12.75pt;&quot;&gt;   &lt;td class=&quot;xl23&quot; height=&quot;17&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot;&gt;,&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;Thousands separator&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;#,###&lt;/td&gt;   &lt;td class=&quot;xl23&quot; style=&quot;border-left: medium none; border-top: medium none;&quot;&gt;123000 displays as   123,000&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the example VBA code to display numbers with no commas or special characters, and no decimal places:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub NumFormat()
 Range(&quot;A1&quot;).NumberFormat = &quot;0&quot;
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
We can display positive and negative numbers differently. Following number format code will display negative numbers in red color.&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;color: #006600;&quot;&gt;#.##;[Red]#.##&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
To specify a display color, include the color name enclosed in square brackets at the start the format code. The available color names are:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Black&lt;/li&gt;
&lt;li&gt;Blue&lt;/li&gt;
&lt;li&gt;Cyan&lt;/li&gt;
&lt;li&gt;Green&lt;/li&gt;
&lt;li&gt;Magenta&lt;/li&gt;
&lt;li&gt;Red&lt;/li&gt;
&lt;li&gt;White&lt;/li&gt;
&lt;li&gt;Yellow&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9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8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/3352431806855275698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/03/number-formatting-in-excel-vba-macro.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/3352431806855275698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/3352431806855275698'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/03/number-formatting-in-excel-vba-macro.html' title='Excel VBA: Number Formatting in Excel VBA Macro'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-4895175021917805144</id><published>2009-02-28T07:28:00.008+07:00</published><updated>2009-02-28T17:09:21.128+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA Macro: Creating a Chart</title><content type='html'>&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;In this post, we will create a chart using Microsoft Excel VBA macro.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 153);&quot;&gt;Embedded Chart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use an embedded chart when you want the chart displayed as part of a worksheet along with the data and/or other charts. Here is the example to create an embedded chart:&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;color: rgb(153, 0, 0);&quot;&gt;&lt;code&gt;Public Sub EmbeddedChart()&lt;br /&gt; Dim myChartObject As ChartObject&lt;br /&gt; Dim myChart As Chart&lt;br /&gt; Set myChartObject = Worksheets(&quot;Sheet1&quot;).ChartObjects.Add(100, 150, 300, 225)&lt;br /&gt; Set myChart = co.Chart&lt;br /&gt; myChart.SetSourceData Source:=Worksheets(&quot;Sheet1&quot;).Range(&quot;A2:E6&quot;), PlotBy:=xlRows&lt;br /&gt;End Sub&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 153);&quot;&gt;Chart Sheets&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use a Chart Sheet when you want a chart displayed in different sheet.&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;color: rgb(153, 0, 0);&quot;&gt;&lt;code&gt;Public Sub ChartSheet()&lt;br /&gt;  Dim mychart As Chart&lt;br /&gt;  Set mychart = ActiveWorkbook.Charts.Add&lt;br /&gt;  mychart.SetSourceData Source:=Worksheets(&quot;Sheet1&quot;).Range(&quot;A2:E6&quot;), PlotBy:=xlRows&lt;br /&gt;End Sub&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(51, 102, 255);&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;---&lt;br /&gt;If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; value=&quot;_s-xclick&quot; type=&quot;hidden&quot;&gt;&lt;input name=&quot;encrypted&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAxToy0g66wx87Gg7fpUThgKH4sIjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIOFipa2OH0xSAgZDOR6dIu4EE409XK3LVwH22uwkCUgRP8Ozjs7fOA41PzdC/7mcCOufJFOhFRID34XIXyTQrjd/5a4Z1f8qEESlKoWZQRbZTP3a19bg1YPBPj0tJuZ+mC3zhV3rxqICqKlPR6C9z2/13TNTvqZTx0SwNxiK7uDzUIReMX8ZnncKXzsOyV6yE3B0TFk8cY4GQQfqgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wHhcNMDQwMjEzMTAxMzE1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mxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; type=&quot;hidden&quot;&gt; &lt;input src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; name=&quot;submit&quot; alt=&quot;PayPal - The safer, easier way to pay online.&quot; type=&quot;image&quot; border=&quot;0&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; border=&quot;0&quot; height=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/4895175021917805144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/excel-vba-macro-creating-chart.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/4895175021917805144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/4895175021917805144'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/excel-vba-macro-creating-chart.html' title='Excel VBA Macro: Creating a Chart'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-6462299815204104865</id><published>2009-02-27T11:12:00.006+07:00</published><updated>2015-11-07T19:27:24.229+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: Protecting Excel VBA Macro Code</title><content type='html'>When we working with Excel VBA macro, sometimes we need to protect our VBA macro code. So nobody can change or modify VBA macro that we have create. Here are steps to protect VBA Project:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Go to Visual Basic Editor by pressing Alt+F11 key.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;In menu toolbar, click &lt;span style=&quot;font-weight: bold;&quot;&gt;Tools&lt;/span&gt; -&amp;gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;VBAProject Properties...&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjnrEKHIIktSSGkA8F-3Sdm3cxGo4CK6YCdoHSPIo-ocAc9CN3ysdQek-MY77yn0uhcAIopOGOU2o6Ej8wSfkuSrPi8BsUtg549ufltiOgQdL6sjDTBwRBb468ye-2dhVumX78vlbuBqw/s1600-h/VBA+Project.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5307329946170888578&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjnrEKHIIktSSGkA8F-3Sdm3cxGo4CK6YCdoHSPIo-ocAc9CN3ysdQek-MY77yn0uhcAIopOGOU2o6Ej8wSfkuSrPi8BsUtg549ufltiOgQdL6sjDTBwRBb468ye-2dhVumX78vlbuBqw/s320/VBA+Project.jpg&quot; style=&quot;cursor: pointer; display: block; height: 218px; margin: 0px auto 10px; text-align: center; width: 251px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;In &lt;span style=&quot;font-weight: bold;&quot;&gt;VBAProject - Properties&lt;/span&gt; dialog box, click &lt;span style=&quot;font-weight: bold;&quot;&gt;Protection&lt;/span&gt; tab, and then check &lt;span style=&quot;font-weight: bold;&quot;&gt;Lock project for viewing&lt;/span&gt; checkbox.&lt;/li&gt;
&lt;/ul&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFMvgZX3qkJrULWbP_NWzOjP3lX-idNo2ZTcXWumo8ecwH8IKWnK2te7wIQlsubHYETaFA4fiLmm6XCxMhZDq9u5i7M03APDMkXeHIRMgZ346CyQqeGuLH5NVQbIytNmlzJaDhQpgZAmg/s1600-h/VBAProject+dialog+box.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5307331380124696082&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFMvgZX3qkJrULWbP_NWzOjP3lX-idNo2ZTcXWumo8ecwH8IKWnK2te7wIQlsubHYETaFA4fiLmm6XCxMhZDq9u5i7M03APDMkXeHIRMgZ346CyQqeGuLH5NVQbIytNmlzJaDhQpgZAmg/s320/VBAProject+dialog+box.jpg&quot; style=&quot;cursor: pointer; display: block; height: 285px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Enter desired password to protect VBA project, then click &lt;span style=&quot;font-weight: bold;&quot;&gt;OK&lt;/span&gt; button. &lt;/li&gt;
&lt;li&gt;Save the VBA project.&lt;/li&gt;
&lt;/ul&gt;
FIN.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 51 , 255); font-weight: bold;&quot;&gt;Related Post:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/excel-vba-macro-example-protect.html&quot;&gt;Protect &amp;amp; Unprotect Worksheet/Excel File&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAxToy0g66wx87Gg7fpUThgKH4sIjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIOFipa2OH0xSAgZDOR6dIu4EE409XK3LVwH22uwkCUgRP8Ozjs7fOA41PzdC/7mcCOufJFOhFRID34XIXyTQrjd/5a4Z1f8qEESlKoWZQRbZTP3a19bg1YPBPj0tJuZ+mC3zhV3rxqICqKlPR6C9z2/13TNTvqZTx0SwNxiK7uDzUIReMX8ZnncKXzsOyV6yE3B0TFk8cY4GQQfqgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCV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r4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/6462299815204104865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/protecting-excel-vba-macro-code.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/6462299815204104865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/6462299815204104865'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/protecting-excel-vba-macro-code.html' title='Excel VBA: Protecting Excel VBA Macro Code'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjnrEKHIIktSSGkA8F-3Sdm3cxGo4CK6YCdoHSPIo-ocAc9CN3ysdQek-MY77yn0uhcAIopOGOU2o6Ej8wSfkuSrPi8BsUtg549ufltiOgQdL6sjDTBwRBb468ye-2dhVumX78vlbuBqw/s72-c/VBA+Project.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-5145825988616253808</id><published>2009-02-24T21:09:00.007+07:00</published><updated>2015-11-07T19:27:34.684+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: Selecting A Row Or Column</title><content type='html'>To select the entire column we can use the &lt;span style=&quot;font-style: italic;&quot;&gt;EntireColumn&lt;/span&gt; property. The following excel VBA macro example demonstrates how to select the column of the active cell.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub SelectColumn()
ActiveCell.EntireColumn.Select
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
The next following excel VBA macro example demonstrates how to perform an operation on all cells in the selected row.  This following procedure changes all cells font size to 18 in the row that contains the active cell.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub ChangeFontSize()
 ActiveCell.EntireRow.Font.Size = 18
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/range-objects.html&quot;&gt;Excel VBA Macro Tutorial: Range Objects&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAxToy0g66wx87Gg7fpUThgKH4sIjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIOFipa2OH0xSAgZDOR6dIu4EE409XK3LVwH22uwkCUgRP8Ozjs7fOA41PzdC/7mcCOufJFOhFRID34XIXyTQrjd/5a4Z1f8qEESlKoWZQRbZTP3a19bg1YPBPj0tJuZ+mC3zhV3rxqIC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TADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/5145825988616253808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/selecting-row-or-column.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/5145825988616253808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/5145825988616253808'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/selecting-row-or-column.html' title='Excel VBA: Selecting A Row Or Column'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-1486857472249015738</id><published>2009-02-22T10:00:00.007+07:00</published><updated>2015-11-07T19:27:53.211+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: Runs An Executable Program In Excel VBA Macro</title><content type='html'>Sometimes, it&#39;s very useful to run another application from Microsoft Excel. To runs another application in Microsoft Excel, we can use VBA&#39;s &lt;span style=&quot;font-style: italic;&quot;&gt;Shell&lt;/span&gt; function. The following example, will lunch the Notepad application and if the &lt;span style=&quot;font-style: italic;&quot;&gt;Shell&lt;/span&gt; function failed to launch the application, it generates an error.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub ExecNotepad()
  On Error Resume Next
  AppVal = Shell(&quot;C:\WINDOWS\NOTEPAD.EXE&quot;, 1)
  If Err &amp;lt;&amp;gt; 0 Then
      MsgBox &quot;Can&#39;t start the application.&quot;, vbCritical, &quot;Error&quot;
  End If
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;&lt;br /&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/inputbox-function.html&quot;&gt;The InputBox Function&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/msgbox-function.html&quot;&gt;The MsgBox Function&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAxToy0g66wx87Gg7fpUThgKH4sIjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIOFipa2OH0xSAgZDOR6dIu4EE409XK3LVwH22uwkCUgRP8Ozjs7f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lcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/1486857472249015738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/runs-executable-program-in-excel-vba.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/1486857472249015738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/1486857472249015738'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/runs-executable-program-in-excel-vba.html' title='Excel VBA: Runs An Executable Program In Excel VBA Macro'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-2861472974350029071</id><published>2009-02-21T01:56:00.010+07:00</published><updated>2015-11-07T19:28:03.403+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: The InputBox Function</title><content type='html'>In Microsoft Excel VBA &lt;a href=&quot;http://vbatutor.blogspot.com/&quot;&gt;Macro&lt;/a&gt;, to obtain a single input from the user, we can use the &lt;span style=&quot;font-weight: bold;&quot;&gt;InputBox&lt;/span&gt; function.&lt;br /&gt;
The &lt;span style=&quot;font-weight: bold;&quot;&gt;InputBox&lt;/span&gt; function is useful for obtaining a single input from the user. Here is the &lt;span style=&quot;font-weight: bold;&quot;&gt;InputBox&lt;/span&gt; function syntax:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code style=&quot;color: #009900;&quot;&gt;InputBox(prompt[,title][,default])&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
The arguments:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;prompt: &lt;span style=&quot;font-style: italic;&quot;&gt;Required&lt;/span&gt;. Text that is displayed in the input box.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;title: &lt;span style=&quot;font-style: italic;&quot;&gt;Optional&lt;/span&gt;. Text that appears in the input box’s title bar.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;default: &lt;span style=&quot;font-style: italic;&quot;&gt;Optional&lt;/span&gt;. The default value.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
The following is an example of how to use the &lt;span style=&quot;font-weight: bold;&quot;&gt;InputBox&lt;/span&gt; function:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub AskUserName
ActiveSheet.Range(&quot;A1&quot;).Value = InputBox(&quot;Your name?&quot;,&quot;Input Name&quot;)
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/msgbox-function.html&quot;&gt;The MsgBox Function&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/range-objects.html&quot;&gt;Excel VBA Macro Tutorial: Range Objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;pre&gt;---
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /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MRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)&lt;/pre&gt;
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/2861472974350029071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/inputbox-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/2861472974350029071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/2861472974350029071'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/inputbox-function.html' title='Excel VBA: The InputBox Function'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-4848379853132641965</id><published>2009-02-19T20:47:00.011+07:00</published><updated>2015-11-07T19:28:13.302+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Tutorial"/><title type='text'>Excel VBA: The MsgBox Function</title><content type='html'>In Excel VBA macro, if we want display a message to the user, we can use the MsgBox function. The syntax for the MsgBox function is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0 , 153 , 0);&quot;&gt;MsgBox(prompt, buttons, title, helpfile, context)&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table cellpadding=&quot;4&quot; cellspacing=&quot;4&quot; cols=&quot;2&quot;&gt;&lt;tbody&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;15%&quot;&gt;&lt;b&gt;&lt;i&gt;prompt&lt;/i&gt;&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;85%&quot;&gt;Required. String  expression displayed as the message in the dialog box. The maximum length of  &lt;b&gt;&lt;i&gt;prompt&lt;/i&gt;&lt;/b&gt; is approximately 1024 characters, depending on the width of  the characters used. If &lt;b&gt;&lt;i&gt;prompt&lt;/i&gt;&lt;/b&gt; consists of more than one line, you  can separate the lines using a carriage return character  (&lt;b&gt;Chr(&lt;/b&gt;13&lt;b&gt;)&lt;/b&gt;), a linefeed character (&lt;b&gt;Chr(&lt;/b&gt;10&lt;b&gt;)&lt;/b&gt;), or  carriage return – linefeed character combination (&lt;b&gt;Chr(&lt;/b&gt;13&lt;b&gt;)&lt;/b&gt; &amp;amp;  &lt;b&gt;Chr(&lt;/b&gt;10&lt;b&gt;)&lt;/b&gt;) between each line.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;15%&quot;&gt;&lt;b&gt;&lt;i&gt;buttons&lt;/i&gt;&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;85%&quot;&gt;Optional. Numeric  expression that is the sum of values specifying the number and type of  buttons to display, the icon style to use, the identity of the default button,  and the modality of the message box. If omitted, the default value for  &lt;b&gt;&lt;i&gt;buttons&lt;/i&gt;&lt;/b&gt; is 0.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;15%&quot;&gt;&lt;b&gt;&lt;i&gt;title&lt;/i&gt;&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;85%&quot;&gt;Optional. String expression displayed in the title bar  of the dialog box. If you omit &lt;b&gt;&lt;i&gt;title&lt;/i&gt;&lt;/b&gt;, the application name is  placed in the title bar.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;15%&quot;&gt;&lt;b&gt;&lt;i&gt;helpfile&lt;/i&gt;&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;85%&quot;&gt;Optional. String expression that identifies the Help  file to use to provide context-sensitive Help for the dialog box. If  &lt;b&gt;&lt;i&gt;helpfile&lt;/i&gt;&lt;/b&gt; is provided, &lt;b&gt;&lt;i&gt;context&lt;/i&gt;&lt;/b&gt; must also be  provided.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;15%&quot;&gt;&lt;b&gt;&lt;i&gt;context&lt;/i&gt;&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;85%&quot;&gt;Optional. Numeric expression that is the Help context  number assigned to the appropriate Help topic by the Help author. If  &lt;b&gt;&lt;i&gt;context&lt;/i&gt;&lt;/b&gt; is provided, &lt;b&gt;&lt;i&gt;helpfile&lt;/i&gt;&lt;/b&gt; must also be provided.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;T&quot;&gt;
The &lt;b&gt;&lt;i&gt;buttons&lt;/i&gt;&lt;/b&gt; argument settings are:&lt;/div&gt;
&lt;table cellpadding=&quot;4&quot; cellspacing=&quot;4&quot; cols=&quot;3&quot;&gt; &lt;tbody&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;th width=&quot;34%&quot;&gt;Constant&lt;/th&gt; &lt;th width=&quot;14%&quot;&gt;Value&lt;/th&gt; &lt;th width=&quot;52%&quot;&gt;Description&lt;/th&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbOKOnly&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;0&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Display &lt;b&gt;OK&lt;/b&gt; button only.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbOKCancel&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;1&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Display &lt;b&gt;OK&lt;/b&gt; and &lt;b&gt;Cancel&lt;/b&gt; buttons.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbAbortRetryIgnore&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;2&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Display &lt;b&gt;Abort&lt;/b&gt;, &lt;b&gt;Retry&lt;/b&gt;, and &lt;b&gt;Ignore&lt;/b&gt;  buttons.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbYesNoCancel&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;3&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Display &lt;b&gt;Yes&lt;/b&gt;, &lt;b&gt;No&lt;/b&gt;, and &lt;b&gt;Cancel&lt;/b&gt;  buttons.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbYesNo&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;4&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Display &lt;b&gt;Yes&lt;/b&gt; and &lt;b&gt;No&lt;/b&gt; buttons.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbRetryCancel&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;5&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Display &lt;b&gt;Retry&lt;/b&gt; and &lt;b&gt;Cancel&lt;/b&gt;  buttons.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbCritical&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;16&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Display&lt;b&gt; Critical Message&lt;/b&gt; icon. &lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbQuestion&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;32&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Display &lt;b&gt;Warning Query&lt;/b&gt; icon.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbExclamation&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;48&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Display &lt;b&gt;Warning Message&lt;/b&gt; icon.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbInformation&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;64&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Display &lt;b&gt;Information Message&lt;/b&gt; icon.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbDefaultButton1&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;0&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;First button is default.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbDefaultButton2&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;256&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Second button is default.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbDefaultButton3&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;512&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Third button is default.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbDefaultButton4&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;768&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Fourth button is default.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbApplicationModal&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;0&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Application modal; the user must respond to the message  box before continuing work in the current application.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbSystemModal&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;4096&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;System modal; all applications are suspended until the  user responds to the message box.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbMsgBoxHelpButton&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;16384&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Adds Help button to the message box&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;VbMsgBoxSetForeground&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;65536&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Specifies the message box window as the foreground  window&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbMsgBoxRight&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;524288&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Text is right aligned&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;vbMsgBoxRtlReading&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;14%&quot;&gt;1048576&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;52%&quot;&gt;Specifies text should appear as right-to-left reading on  Hebrew and Arabic systems&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
The MsgBox function returns an integer value that identifies the button the user selected&lt;br /&gt;
to close the dialog box.&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;table cellpadding=&quot;4&quot; cellspacing=&quot;4&quot; cols=&quot;3&quot;&gt; &lt;tbody&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;th width=&quot;33%&quot;&gt;Constant&lt;/th&gt; &lt;th width=&quot;33%&quot;&gt;Value&lt;/th&gt; &lt;th width=&quot;34%&quot;&gt;Description&lt;/th&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;&lt;b&gt;vbOK&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;1&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;OK&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;&lt;b&gt;vbCancel&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;2&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;Cancel&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;&lt;b&gt;vbAbort&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;3&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;Abort&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;&lt;b&gt;vbRetry&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;4&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;Retry&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;&lt;b&gt;vbIgnore&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;5&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;Ignore&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;&lt;b&gt;vbYes&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;6&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;Yes&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;&lt;b&gt;vbNo&lt;/b&gt;&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;33%&quot;&gt;7&lt;/td&gt; &lt;td class=&quot;T&quot; width=&quot;34%&quot;&gt;&lt;b&gt;No&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example of using MsgBox funtion:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;Sub ShowMsgBox()&lt;/span&gt;
&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;   Dim response As Integer&lt;/span&gt;
&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;    &lt;/span&gt;
&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;   &lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;color: #990000;&quot;&gt;response&lt;/code&gt;&lt;code style=&quot;color: #990000;&quot;&gt; = MsgBox(&quot;Do you want to continue?&quot;, vbYesNo + vbQuestion)

If &lt;/code&gt;&lt;code style=&quot;color: #990000;&quot;&gt;response&lt;/code&gt;&lt;code style=&quot;color: #990000;&quot;&gt; = vbYes Then
   Range(&quot;A1&quot;).Value = &quot;&#39;Yes&#39; button clicked.&quot;
Else&lt;/code&gt;&lt;code style=&quot;color: #990000;&quot;&gt;      Range(&quot;A1&quot;).Value = &quot;&#39;No&#39; button clicked.&quot;&lt;/code&gt;&lt;code style=&quot;color: #990000;&quot;&gt;   End If
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/range-objects.html&quot;&gt;Excel VBA Macro Tutorial: Range Objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAxToy0g66wx87Gg7fpUThgKH4sIjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIOFipa2OH0xSAgZDOR6dIu4EE409XK3LVwH22uwkCUgRP8Ozjs7fOA41PzdC/7mcCOufJFOhFRID34XIXy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FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/4848379853132641965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/msgbox-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/4848379853132641965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/4848379853132641965'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/msgbox-function.html' title='Excel VBA: The MsgBox Function'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-722194704484361786</id><published>2009-02-18T20:51:00.005+07:00</published><updated>2015-11-07T19:28:26.728+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: Looping through a range</title><content type='html'>The following microsoft excel VBA macro example demonstrates how to loop through all the cells in a range. This example uses the &lt;b&gt;For Each...Next&lt;/b&gt; statement to search the word &quot;Microsoft Excel VBA&quot; in a range and changes its font style to bold. In this case, the range is from A1 to E5.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub ChangeFontStyle()
   Dim Cell As Range
  
   For Each Cell In Range(&quot;A1:E5&quot;)
       If LCase(Cell.Value) = &quot;microsoft excel vba&quot; Then
           Cell.Font.Bold = True
       End If
   Next Cell
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;&lt;br /&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/excel-vba-macro-tutorial-looping.html&quot;&gt;Excel VBA Macro Tutorial: Looping&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/how-to-replace-data-using-excel-vba.html&quot;&gt;Find A Particular Text Within Ranges And Return Its Row Position&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/range-objects.html&quot;&gt;Excel VBA Macro Tutorial: Range Objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/722194704484361786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/looping-through-range.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/722194704484361786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/722194704484361786'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/looping-through-range.html' title='Excel VBA: Looping through a range'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-5800118246921345290</id><published>2009-02-17T22:06:00.007+07:00</published><updated>2015-11-07T19:28:38.403+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: Cut and paste using macro</title><content type='html'>In this Excel VBA Macro Examples section, I will show you how to move a range.  This following example will move a range A4:E4 to I15:M15 in active sheet.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub MoveRange()
  ActiveSheet.Range(&quot;A4:E4&quot;).Cut _
    Destination:=ActiveSheet.Range(&quot;I15&quot;)
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
If &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Destination&lt;/span&gt; argument is omitted, Microsoft Excel cuts the range to  the Clipboard.&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/excel-vba-macro-example-copying-range.html&quot;&gt;Excel VBA Macro Examples: Copying a range&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-function.html&quot;&gt;Excel VBA Macro Examples: Function Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/5800118246921345290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/moving-range.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/5800118246921345290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/5800118246921345290'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/moving-range.html' title='Excel VBA: Cut and paste using macro'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-6360853021712491597</id><published>2009-02-16T19:57:00.016+07:00</published><updated>2015-11-07T19:28:58.467+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: How To Delete Cells That Contain Certain Word</title><content type='html'>Sometimes, when we working with &lt;a href=&quot;http://vbatutor.blogspot.com/&quot;&gt;excel&lt;/a&gt; we need to delete cells that contain certain word. In this section, we will create excel vba macro code to delete cells that contain certain word.&lt;br /&gt;
&lt;br /&gt;
Firstly, we have to create a function that we need for our next procedure. This function will count number of certain word in active sheet.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Function countText(ByVal searchText As String)
Dim rS As Range, counter As Long

counter = 0
Set rS = Cells.Find(searchText, LookIn:=xlValues, &lt;/code&gt;&lt;code&gt;LookAt:=xlWhole&lt;/code&gt;&lt;code&gt;)

If Not rS Is Nothing Then
    fAddress = rS.Address
    Do
        counter = counter + 1
        Set rS = Cells.FindNext(rS)
    Loop While Not rS Is Nothing And rS.Address &amp;lt;&amp;gt; fAddress
End If

countText = counter
End Function&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
And then, here is the main part of the procedure that will delete cells that contain certain word.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub DeleteCells(ByVal sText As String)
Dim r As Range

While countText(sText) &amp;gt; 0
    Set r = Cells.Find(sText, LookIn:=xlValues, LookAt:=xlWhole)

    If Not r Is Nothing Then
        r.Delete
    End If
Wend
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Here is an example how to use the procedure above. This example will delete cells that contain word &quot;blablabla&quot; in active sheet.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub TheExample()
DeleteCells (&quot;&lt;/code&gt;blablabla&lt;code&gt;&quot;)
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/how-to-replace-data-using-excel-vba.html&quot;&gt;How To Replace Data Using Excel VBA Macro Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/how-to-replace-data-using-excel-vba.html&quot;&gt;Find A Particular Text Within Ranges And Return Its Row Position&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-function.html&quot;&gt;Excel VBA Macro Examples: Function Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&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RwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/6360853021712491597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/how-to-delete-cells-that-contain.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/6360853021712491597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/6360853021712491597'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/how-to-delete-cells-that-contain.html' title='Excel VBA: How To Delete Cells That Contain Certain Word'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-6290482016572963527</id><published>2009-02-15T15:18:00.007+07:00</published><updated>2015-11-07T19:29:08.270+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: How To Replace Data Using Excel VBA Macro Code</title><content type='html'>In my case, I often manipulating data, including but not limited to searches all data in a worksheet and makes the specified replacement.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s an example how replace data using excel vba macro code. This example will replace all cell value that contain word &quot;micro excel&quot; to &quot;macro excel&quot; in active sheet.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;Sub ReplaceAllData()&lt;/span&gt;

&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;    Cells.Replace _&lt;/span&gt;
&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;        What:=&quot;micro excel&quot;, Replacement:=&quot;macro excel&quot;, _
    LookAt:=xlWhole, MatchCase:=False&lt;/span&gt;

&lt;span style=&quot;color: rgb(153 , 0 , 0);&quot;&gt;End Sub&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
If you to make the search case sensitive you can change the &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;MatchCase&lt;/span&gt; property to &lt;span style=&quot;font-style: italic;&quot;&gt;true&lt;/span&gt;. And also if you want to replace data that contain part of the searched data you can change the &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;LookAt &lt;/span&gt;property to &lt;span style=&quot;font-style: italic;&quot;&gt;xlPart&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/how-to-replace-data-using-excel-vba.html&quot;&gt;Find A Particular Text Within Ranges And Return Its Row Position&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-function.html&quot;&gt;Excel VBA Macro Examples: Function Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/range-objects.html&quot;&gt;Excel VBA Macro Tutorial: Range Objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAx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GUpIGRMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/6290482016572963527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/how-to-replace-data-using-excel-vba.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/6290482016572963527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/6290482016572963527'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/how-to-replace-data-using-excel-vba.html' title='Excel VBA: How To Replace Data Using Excel VBA Macro Code'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-4891460097679775143</id><published>2009-02-15T07:02:00.012+07:00</published><updated>2015-11-07T19:29:17.588+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: Find A Particular Text Within Ranges And Return Its Row Position</title><content type='html'>In Microsoft Excel, sometimes we need to find the row position of particular text or even formula, to be able to insert certain of data below the corresponding text or even to delete row that contain the corresponding text.&lt;br /&gt;
This is an excel &lt;a href=&quot;http://vbatutor.blogspot.com/&quot;&gt;vba macro code&lt;/a&gt; to return row position that contain specific text.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;Function rowPosition(ByVal searchText As Variant, _&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    Optional ByVal stLookAt As XlLookAt = xlPart) As Long&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    &lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    Dim rPos As Long, rS As Range&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    &lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    rPos = 0&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    &lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    Set rS = Cells.Find(searchText, LookIn:=xlValues, LookAt:=stLookAt)&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    &lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    If Not rS Is Nothing Then rPos = rS.Row&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    &lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    rowPosition = rPos&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    &lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;End Function&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
The &lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-function.html&quot;&gt;function&lt;/a&gt; above have two arguments:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;searchText&lt;/span&gt; : the text you are searching for&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;stLookAt&lt;/span&gt; : use &lt;span style=&quot;font-style: italic;&quot;&gt;xlWhole&lt;/span&gt; if you want to search the whole text, or use &lt;span style=&quot;font-style: italic;&quot;&gt;xlPart&lt;/span&gt; if otherwise&lt;br /&gt;
&lt;br /&gt;
Here is example how to use the function above. This example deletes entire row that contain word &quot;Test&quot;.&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;Sub RunExample()&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    Dim rwPos As Long&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;       &lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    &#39;Find row position&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    rwPos = rowPosition(&quot;Test&quot;, xlPart)&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    &lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    &#39;If found then delete entire row&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;    If rwPos &amp;gt; 0 Then Rows(rwPos).Delete&lt;/span&gt;
&lt;span style=&quot;color: rgb(204 , 0 , 0);&quot;&gt;End Sub&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-function.html&quot;&gt;Excel VBA Macro Examples: Function Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Macro Examples: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/range-objects.html&quot;&gt;Excel VBA Macro Tutorial: Range Objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-controlling.html&quot;&gt;Excel VBA Macro Tutorial: Controlling Execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
---&lt;br /&gt;
If you like posts in this blog, you can&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;encrypted&quot; type=&quot;hidden&quot; value=&quot;-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCRgQa2i6AHDln3Vz4dDgvjAmq2tepZAqQpHeRd/w80AonsbGEcBqupBTg4hbBdKi0XhG8TV00XTHGF+KpcN3ZCeKFSLV1ToPhsQwb3mqfNgp2Wq27cZmjqyotM9pn8dKM5Snx0Lyj3FjwIJVAxToy0g66wx87Gg7fpUThgKH4sIjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIOFipa2OH0xSAgZDOR6dIu4EE409XK3LVwH22uwkCUgRP8Ozjs7fOA41PzdC/7mcCOufJFOhFRID34XIXyTQrjd/5a4Z1f8qEESlKoWZQRbZTP3a19bg1YPBPj0tJuZ+mC3zhV3rxqICqKlPR6C9z2/13TNTvqZTx0SwNxiK7uDzUIReMX8ZnncKXzsOyV6yE3B0TFk8cY4GQQfqgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwE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nD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTAyMjcwNzA1NTdaMCMGCSqGSIb3DQEJBDEWBBTf3wY9T2jyOT6lIM9WDFe+BlZTvDANBgkqhkiG9w0BAQEFAASBgGazFmgDm/nYj5uKuIyfs+ChrkSCmkq0ISlcVbth6ydXn0wM5e8Q7aq/Yv9SSR2nZNx2TPrS1kQ6T4B5JsyosbP/waz2bdRhJuxIFAWAlytuiso9lDcSTAx+xBsIw4kKndaMVYMtNd3oe/RCVC9lMhCRlF2nmA+rBD67Fh8OauB/-----END PKCS7----- &quot; /&gt; &lt;input alt=&quot;PayPal - The safer, easier way to pay online.&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt; to support me :)</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/4891460097679775143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/find-specific-text-within-ranges-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/4891460097679775143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/4891460097679775143'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/find-specific-text-within-ranges-and.html' title='Excel VBA: Find A Particular Text Within Ranges And Return Its Row Position'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-1088083685032978307</id><published>2009-02-14T21:10:00.007+07:00</published><updated>2015-11-07T19:29:27.334+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: Check Whether Workbook Is Already Open Or Not</title><content type='html'>I often transfer data from current excel workbook to another excel workbook repeatedly. And I prefer creating &lt;a href=&quot;http://vbatutor.blogspot.com/&quot;&gt;vba macro&lt;/a&gt; to automate the task rather than doing it manually, which is very time consuming. So, before I open the destination excel workbook, I need to check whether the destination excel workbook is already open or not.&lt;br /&gt;
&lt;br /&gt;
The following &lt;a href=&quot;http://vbatutor.blogspot.com/&quot;&gt;vba macro code&lt;/a&gt; is the function to check whether a workbook is already open or not. This function is quiet simple, it just do &lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/excel-vba-macro-tutorial-looping.html&quot;&gt;looping&lt;/a&gt; in Workbooks collection to check all opened workbook, if there is a workbook that have same name with the workbook we are looking for, then the function will return True or False if otherwise.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Function isWorkbookOpen(bookName As String) As Boolean
Dim vbResult As Boolean
Dim wbs As Workbook

vbResult = False
For Each wbs In Workbooks
    If UCase(wbs.Name) = UCase(bookName) Then
        vbResult = True
        Exit For
    End If
Next wbs
isWorkbookOpen = vbResult
End Function&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
This example show you how to use the function above.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub openWorkbook()
If isWorkbookOpen(&quot;macroexcel.xls&quot;) = False Then
   Workbooks.Open &quot;d:\macroexcel.xls&quot;
Else
   MsgBox &quot;Workbook macroexcel.xls is already open.&quot;
End If
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 102 , 255); font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/excel-vba-macro-example-opening-closing.html&quot;&gt;Excel VBA Examples: Opening &amp;amp; closing a workbook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/excel-vba-macro-tutorial-looping.html&quot;&gt;Excel VBA Tutorial: Looping&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-function.html&quot;&gt;Excel VBA Tutorial: Function Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Excel VBA Tutorial: Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/1088083685032978307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/check-whether-workbook-already-open-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/1088083685032978307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/1088083685032978307'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/check-whether-workbook-already-open-or.html' title='Excel VBA: Check Whether Workbook Is Already Open Or Not'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6761332894277119090.post-6628780272189082145</id><published>2009-02-14T13:46:00.020+07:00</published><updated>2015-11-07T19:29:41.043+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Macro Examples"/><title type='text'>Excel VBA: Protect &amp; Unprotect Worksheet/Excel File</title><content type='html'>Imagine this; you are working with protected excel file, so only authorized user can access the file. Let&#39;s say you are the authorized user, and you are going to create macro excel that need an access to the protected file.&lt;br /&gt;
&lt;br /&gt;
This vba macro example, sets password to excel file named &quot;excel.xls&quot;. This example assumes excel file named &quot;excel.xls&quot; already open.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub ProtectExcel()
&#39;write password
Workbooks(&quot;excel.xls&quot;).Password = &quot;macroexcel&quot;

&#39;save workbook
Workbooks(&quot;excel.xls&quot;).Save
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
This example opens the protected excel file named &quot;excel.xls&quot; on the D:\ drive.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub OpenProtectedExcel()
&#39;open protected excel file
Workbooks.Open Filename:=&quot;D:\excel.xls&quot;, _
  Password:=&quot;macroexcel&quot;
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
This example remove protection from worksheet named &quot;Sheet1&quot; and protect it with new password.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;color: #990000;&quot;&gt;&lt;code&gt;Sub xProtect()
&#39;Assumes excel.xls already open
&#39;unprotect sheet
Workbooks(&quot;excel.xls&quot;).Sheets(&quot;Sheet1&quot;).Unprotect &quot;password&quot;

&#39;protect sheet with new password
Workbooks(&quot;excel.xls&quot;).Sheets(&quot;Sheet1&quot;).Protect &quot;vbamacro&quot;

&#39;save changes
Workbooks(&quot;excel.xls&quot;).Save
End Sub&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;color: rgb(51 , 51 , 255); font-weight: bold;&quot;&gt;Related posts:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/excel-vba-macro-example-opening-closing.html&quot;&gt;Opening &amp;amp; Closing Workbook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-sub-procedure.html&quot;&gt;Sub Procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://vbatutor.blogspot.com/2009/02/vba-macro-excel-tutorial-function.html&quot;&gt;Function Procedure&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbatutor.blogspot.com/feeds/6628780272189082145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbatutor.blogspot.com/2009/02/excel-vba-macro-example-protect.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/6628780272189082145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6761332894277119090/posts/default/6628780272189082145'/><link rel='alternate' type='text/html' href='http://vbatutor.blogspot.com/2009/02/excel-vba-macro-example-protect.html' title='Excel VBA: Protect &amp; Unprotect Worksheet/Excel File'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>