<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;Dk4HRHkzeip7ImA9WhRUFkU.&quot;"><id>tag:blogger.com,1999:blog-28492262</id><updated>2012-01-27T09:22:15.782-08:00</updated><category term="Autotagging using Word VBA" /><category term="VBA Format Images" /><category term="Excel VBA 1004 -- The file could not be accessed" /><category term="Windows Directory using VBA" /><category term="Modifying File Atrributes" /><category term="Turn the Image Upside Down" /><category term="Extract Macro Names from Workbook" /><category term="Extract Keywords" /><category term="Height of Row using Excel VBA" /><category term="How to unistall Excel/Word addins using Visual Studio" /><category term="Print Multiple Sheets using VBA" /><category term="VBA Comments" /><category term="VBA Excel Comment Automation" /><category term="Update Access 2007 table using ADO" /><category term="Outlook VBA Explorers collection" /><category term="Document Styles using Word VBA" /><category term="Excel VBA ShowTotals Method" /><category term="Chartwizard method in Excel VBA" /><category term="AutomationSecurity" /><category term="Setting Tool tip through Code" /><category term="DeleteMenu WinAPI Function" /><category term="Remove Autofilter using VBA" /><category term="Get Variable Type" /><category term="VBProject" /><category term="Excel Events Disable" /><category term="Microsoft Jet and Replication objects" /><category term="Export Powerpoint Slide to Image using VBA" /><category term="Array Filter" /><category term="Show All Comments in Excel VBA" /><category term="Check state of protection of VBProject" /><category term="How to add macro to workbook using VBA" /><category term="Visual Basic CommonDialog" /><category term="Display Unique Rows using Advanced Filter Excel VBA" /><category term="VBA ThisWorkbook.VBProject" /><category term="Creating Presentation using VBA" /><category term="VBA Extract Excel Comments using VBA" /><category term="VBA Read Text Files" /><category term="insert field in 2010" /><category term="vbDirectory" /><category term="Shape Attributes through Word VBA" /><category term="Update non-contiguous ranges using VBA" /><category term="Excel-Outlook" /><category term="Error in Excel formula" /><category term="Display ToolTipText in CommandBar Controls" /><category term="Create New Command Bar" /><category term="No of processors using VBA" /><category term="Check Presence of AutoFilter in a Sheet using VBA" /><category term="Outlook VBA Extract Subject of Mails" /><category term="SaveAs Option with Password in Powerpoint VBA" /><category term="VBA Attach Module" /><category term="VBA" /><category term="Set Chart Title programatticaly using Excel VBA" /><category term="VarType" /><category term="VBA Temporary Folder Path" /><category term="MSHFlexGrid" /><category term="Excel VBA SpecialCells Numerals in Formula Results" /><category term="Ppwerpoint to image conversion using VBA" /><category term="Extract  external links using VBA" /><category term="Excel Cell Rotation" /><category term="VBA to create database on the fly" /><category term="VSTO Addin Functions in VBA" /><category term="Show Open Dialog Box" /><category term="Optional Parameters" /><category term="Scaling of Pictures / Images using VBA" /><category term="VBA Get User Name" /><category term="GetSaveAsFilename Method" /><category term="Outlook VBA GetDefaultFolder  MEthod" /><category term="VBA recursive deep directory search" /><category term="VBA Command Bars" /><category term="Delete Comments using VBA" /><category term="Merging Files using VBA" /><category term="Increase Speed of Macros" /><category term="Optimize VBA Code" /><category term="1004 Microsoft Office Excel cannot access the file" /><category term="Formatting Cells Programmatically using VBA" /><category term="Create Folder VBA" /><category term="MSFlexGrid" /><category term="Using Help" /><category term="Rebind keys using VBA" /><category term="InputBox method" /><category term="Word VBA convert character codes to Unicode character" /><category term="VBA Position of Images" /><category term="VBA Controls.Add" /><category term="Excel VBA References property" /><category term="Temporary Folder Visual Basic Code" /><category term="Excel Formula recalculation" /><category term="Excel VBA WebOptions" /><category term="Option Compare Text. VBA Case Insensitive Cpmparison" /><category term="msoFlipVertical" /><category term="Compare Files by Date" /><category term="VBA Extract Properties" /><category term="Events in VBA" /><category term="Excel VBA Saved property" /><category term="Programming OLEOBjects in VBA to embed Word Document" /><category term="VBA Event procedures" /><category term="Excel VBA FileSearch property" /><category term="Filtering Range using Excel VBA" /><category term="PlaySound API Function" /><category term="MAPI Namespace in Outlook VBA" /><category term="Remove Comments using VBA" /><category term="WorksheetFunction Example" /><category term="Application.Wait as Sleep in VBA" /><category term="Office 2007 show developer tab" /><category term="Visual Basic Keydown event" /><category term="VBA Code to transfer the array contents to Excel" /><category term="How to stream a text file to speaker using VBA" /><category term="Outlook VBA ExchangeStoreType" /><category term="Outlook VBA Subject property" /><category term="Disable command bars and controls" /><category term="Excel VBA Right Click Menu item creation" /><category term="Excel formula calculation error" /><category term="ShutDown Windows using VBA" /><category term="Word VBA Synonyms" /><category term="EDATE WorksheetFunction" /><category term="AutoFilter using Excel VBA" /><category term="Check if Range is Filtered using VBA" /><category term="Excel to Word using VBA" /><category term="Hide All Comments in Excel VBA" /><category term="Write to Text File" /><category term="Application.Speech VBA" /><category term="InStrRev Function in VBA" /><category term="VSTO Array to Range" /><category term="Read files using VBA Read Configuration Files using VBA" /><category term="Application.GoTo" /><category term="ADOX Catalog" /><category term="Collection of objects using Excel VBA" /><category term="Word VBA Insert Symbols" /><category term="Search Text in Google using Excel VBA" /><category term="VBA identify if program is in debug mode" /><category term="Check if Date within Range" /><category term="VBA Function to return more than one value" /><category term="Early Binding" /><category term="Get OS Version using VBA" /><category term="Disable Right Click Menu" /><category term="Create Slides using VBA" /><category term="Get Domain Name" /><category term="ADO Insert SQL Query" /><category term="External table is not in the expected format - Excel ADO VBA" /><category term="Get Sub Directories using  VBA Dir Function" /><category term="Windows API Functions" /><category term="Adding Images to Header using Word VBA" /><category term="Insert Values for Multiple Cells using Excel VSTO" /><category term="VBA TotalsRowRange" /><category term="GetTempPath" /><category term="Get Temp Folder" /><category term="Automate TextBox" /><category term="Update Access 2007 table using VBA" /><category term="Document Creation Time in VBA" /><category term="Populate Userform with Excel Range using VBA" /><category term="Executing Excel VBA procedures" /><category term="Excel VBA CodeModule" /><category term="MAcro for Creating PivotTable" /><category term="ADODB in Excel" /><category term="Automate Outlook" /><category term="Connection String CSV File ADO" /><category term="Formatting Report" /><category term="Add Combo Box using Word VBA" /><category term="Add command button to worksheet using VBA" /><category term="Show Pivot Table Field List" /><category term="Excel VBA FindFormat" /><category term="Action on message box responses" /><category term="Aligning Text Output" /><category term="How to determine the source of Pivot Table using VBA" /><category term="Windows API  Process32First" /><category term="Lotus Notes Mail Automation" /><category term="Get Sub Directories using  VBA FileSystemObject Function" /><category term="Terminate Word Process using VBA" /><category term="Word VBA Print Setup Dialog" /><category term="Add Ole Control to Word Document" /><category term="VBA Function to Logoff" /><category term="Convert Decimal to Percent using VBA" /><category term="Identify the last-modified or latest file using Excel VBA" /><category term="VSTO Excel Autofit Columns" /><category term="Update all Field Codes in Word Document" /><category term="Code Validate Date" /><category term="Copy Comments to Range using Excel VBA" /><category term="VBS Convert to Percent" /><category term="Excel VBA Application.CellDragAndDrop" /><category term="Time Function" /><category term="VBA Filler Function" /><category term="Change Text in Textboxes using word VBA" /><category term="Excel VBA Select named range" /><category term="ActiveVBProject property" /><category term="ADO to update database" /><category term="VBA DateDiff" /><category term="Excel VBA NumberFormat" /><category term="Switch off Track Revisions using Word VBA" /><category term="Maximum No of Rows in Excel 2007" /><category term="Excel Macros Speedup" /><category term="VBA Open and Repair Workbook" /><category term="Excel VBA Tag Underlined Text" /><category term="Special Folders" /><category term="Open and Repair Excel Workbook using VBA" /><category term="Userdefined Function in Excel VBA" /><category term="Select Webpage using VBA" /><category term="VBA sleep function" /><category term="VSTO" /><category term="VBA Arrays" /><category term="ADO Text File Connection String" /><category term="VBA Find Method Example" /><category term="Convert Word Symbols to Entities using Visual Basic" /><category term="Word VBA for InlineShapes" /><category term="VBA Last save time" /><category term="VBA Temporary Folder" /><category term="Alter Security settings in workbook through VBA" /><category term="Running Extrernal Application used VBA" /><category term="Powerpoint VBA SaveAs Argument Password Option" /><category term="Dir$ Function Example" /><category term="ScreenUpdating" /><category term="ADO" /><category term="Menu" /><category term="SQL Server 2005 Express VBA" /><category term="Identify Error Cells in a Sheet using Excel VBA" /><category term="Application.IsTrusted in Outlook VBA" /><category term="Add Total Row to Excel Table using VBA" /><category term="vba code to Hide and unhide Worksheet" /><category term="Arrays in AutoFilter Excel VBA" /><category term="VBA Insert SQL Query" /><category term="Word insert Properties using Field Codes" /><category term="VBA Copyfolder" /><category term="Find End Of Document using Word VBA" /><category term="Excel CommandBarControl VBA" /><category term="VBA Modify Non-continuous ranges" /><category term="Remove End Punctutations from List Items using VBA" /><category term="AddOLEControl Command Buttons" /><category term="No of days in a month using Excel VBA" /><category term="enable popup menu" /><category term="VBA FreeFile" /><category term="VBA Extract Keywords" /><category term="Excel VBA Conditional Formatting" /><category term="Text Files as Datasource" /><category term="Programmatically add macros to workbook" /><category term="Excel VBA OleObjects" /><category term="VBA Tool Tip Text" /><category term="Automatic to Manual Hyphens using Word VBA" /><category term="EnableMenuItem WinAPI Function VB EXample" /><category term="Word VBA 5101 - This bookmark does not exist error" /><category term="Run-time error '1004': Add method of addins class failed" /><category term="Disable AutoRecovery using Word VBA" /><category term="Word VBA How to prevent spelling errors in Word Document" /><category term="Enable or Disable dragging and dropping cells in Excel" /><category term="Macro to Update File Properties" /><category term="How to check if Pivot Table is external" /><category term="VBA ASC Function" /><category term="Excel VBA breaking links" /><category term="ChartWizard in Excel VBA" /><category term="Open XML File in Excel" /><category term="Disable Close Button" /><category term="EXcel VBA Sheet Protection" /><category term="Excel VBA Uninstall Addins" /><category term="Extract Color Range using Excel VBA" /><category term="Word VBA Check if Selection is within Table" /><category term="FileSystemObject folderexists" /><category term="Excel VBA Replace Function" /><category term="VBA Show processes in Task Manager" /><category term="Windows API Get Screen Height" /><category term="WeekDay Excel VBA" /><category term="How to digitally sign a VBA Project" /><category term="Excel VBA Application.FindFormat" /><category term="Check if Code is Trusted Outlook VBA" /><category term="Check Existence of Book mark" /><category term="Scroll Window using Excel VBA" /><category term="VBA Mail automation" /><category term="Validate User Value for Comboboxes in Word VBA" /><category term="Excel VBA Tips" /><category term="How to make single instance VB Application" /><category term="Show Excel Status Bar" /><category term="IsMissing Function" /><category term="Using Excel Functions in VBA" /><category term="Outlook VBA PropertyAccessor" /><category term="Microsoft HTML Object Library in VBA" /><category term="Validate Date" /><category term="Copying Files VBA" /><category term="Excel Tables and its advantages" /><category term="Retrieve TextBox Content from Powerpoint VBA" /><category term="Install Word Addins using VBA" /><category term="Undo changes programmatically using VBA" /><category term="Add Argument Descriptions to Excel UDFs" /><category term="Listobjects DataBodyRange using VBA" /><category term="Case in-sensitive comparison" /><category term="Run a Macro with arguments from Different Workbook" /><category term="MoveFile  Example" /><category term="Visual Basic ReDim statement" /><category term="Excel VBA Create Pivot Table using Wizard" /><category term="Rtf to Word" /><category term="VB GetAttr Function" /><category term="VBA Tag Macro to an Image" /><category term="VBA Select a Folder" /><category term="Change Caption of Command Button using Word VBA" /><category term="Visual Basic Get Screen Area" /><category term="Excel VBA Find Matches Array" /><category term="Excel Sheet Comments to Range" /><category term="Automating Excel from Asp.Net" /><category term="Add Text Box to Slide" /><category term="Word VBA AddOLEControl" /><category term="ADO Errors" /><category term="Execute Macro in All Files" /><category term="Aligning Text File" /><category term="Outlook VBA GetNameSpace method" /><category term="Find the no of Working days in a year using VBA" /><category term="EXcel VBA Protect Sheet" /><category term="Word VBA Get Author Names" /><category term="Content Controls in VBA" /><category term="VBA Delete Folder" /><category term="Creating Digital Signature for VBA Project" /><category term="VBA Disable shortcuts" /><category term="Shortcut for MArking indexes using VBA" /><category term="Print Multiple Ranges" /><category term="Macro to extract editable ranges" /><category term="Word VBA Check if Cursor is within Table" /><category term="Dynamic Creation of Function / Procedure in BAS/Class Module" /><category term="Login to Website using Excel VBA" /><category term="VBA Application.Filesearch" /><category term="DocProperty Field in Word VBA" /><category term="Save Chart as Jpeg files using VBA" /><category term="Visual Basic Code Optimization" /><category term="VBA code to find underlined text" /><category term="Word VBA SynonymInfo" /><category term="Add AutoCorrect  Entries for Word using VBA" /><category term="Wait method in VBA" /><category term="Show Dialog" /><category term="Excel VBA Transpose" /><category term="Asp.Net Office Applications" /><category term="GetExitCodeProcess API Function" /><category term="Excel VBA VBComponents" /><category term="File Size - VBA Function" /><category term="Automate Lotus Notes" /><category term="Read Text files using FileSystemObject" /><category term="VBA Tips and Tricks" /><category term="VBA scheduling functions" /><category term="Insert data through SQL to Accdb" /><category term="Extract Underlined Range using Excel VBA" /><category term="Paste Formatted Text from Word to Outlook using VBA" /><category term="Open Specific Folder using Visual Basic" /><category term="Excel VBA ADO for Text Files" /><category term="Multiple Return Parameters in Visual Basic" /><category term="Convert document to PDF using VBA" /><category term="OpenProcess  API Function" /><category term="VBA Send File to Recycle Bin" /><category term="Create a Pivot Table from Existing Pivot Cache" /><category term="read-only attributes" /><category term="VBA Disabling Close Button" /><category term="Disable Maximize button using VBA" /><category term="Visual Basic Choose Function" /><category term="Check Application Instances" /><category term="How to Load Analysis ToolPak in Excel 2007" /><category term="Convert Webaddress or email as Hyperlinks" /><category term="How to create an event in VBA" /><category term="Automate Powerpoint" /><category term="open all Excel Workbooks under a particular directory" /><category term="Excel VBA add OLEObject object" /><category term="VBA Drag and DRop Files to Text Box" /><category term="VB6 GetObject" /><category term="Check broken reference using VBA" /><category term="Edit Embedded Objects using Word VBA" /><category term="Excel VBA Convert Dates into Arrays" /><category term="Highlight Editable ranges using VBA" /><category term="RemoveMenu  Win API Function" /><category term="Excel Print Multiple Sheets" /><category term="Convert Drive Name to Sharename using VBA" /><category term="Hide / Unhide Sheet Tab using Excel VBA" /><category term="VBA Dir Function" /><category term="Excel Shapes" /><category term="Disable Developer Tab in Office 2010" /><category term="VBA Find All Method Example" /><category term="Popup Menu" /><category term="EXcel VBA Check  Procedure Existence. Count the No of MAcros in a Workbook" /><category term="Add TextBoxes to Sheet Programmatically using VBA" /><category term="VBA Get System Processes" /><category term="Download Code File Size" /><category term="Install Word Templates (Addins / .DOT files) using VBA" /><category term="Loop thru Folders" /><category term="Neatly Spaced Text File" /><category term="VBA XCOPY Function" /><category term="VBA HideFieldCodes" /><category term="Powerpoint VBA CommandBarPopup" /><category term="VBA to Select Multiple Sheets" /><category term="Word VBA VerticalResolution" /><category term="Download Code  Latest File" /><category term="Keywords properties" /><category term="Copy Files using VBA" /><category term="How to search embedded Excel using Word VBA" /><category term="Windows API Get Screen Width" /><category term="Word Field Codes" /><category term="How to use collections in Excel VBA" /><category term="VBA CommandBarControl" /><category term="AutoRecovery using Word VBA. VBA Auto Recovery" /><category term="VBA Choose Function" /><category term="Excel VBA Shortcuts" /><category term="ADO connection Events in VBA" /><category term="Add a new menu item to the Tools menu" /><category term="Excel VBA  PivotTable" /><category term="Insert Macro to a Module Using VBComponents" /><category term="Word 2010" /><category term="Disable Cut and Copy from Popup menu" /><category term="Categorize Excel UDFs" /><category term="NetworkDays Worksheet Function" /><category term="Unhide Columns using Excel VBA" /><category term="Word VBA AutoFormatReplaceHyperlinks  Automatically Format Hyperlinks" /><category term="Common Dialog Example VB" /><category term="Visual BAsic Filler Function" /><category term="Chart to Image Conversion using VBA" /><category term="InStr Function" /><category term="Set the Project Name of VBA project programmatically" /><category term="Get the Shared Name of a drive" /><category term="Hide / Unhide Worksheets using Excel VBA (Excel 2007)" /><category term="USER DOMAIN using VBA" /><category term="Excel VBA IsDirty Function" /><category term="Excel WorkDay Function" /><category term="VBA Msgbox" /><category term="DDE or OLE Automation in Excel VBA" /><category term="Microsoft Outlook Mail Automation" /><category term="Adding Controls using Powerpoint VBA" /><category term="Select a Named Range using Excel VBA" /><category term="Save Selected Range as RTF using VBA" /><category term="VBA FileLen Function" /><category term="Word VBA HorizontalResolution" /><category term="Word VBA Expand Ranges" /><category term="Maximum Characters In a cell in Excel 2007/2010" /><category term="Export Excel Chart to Image using VBA" /><category term="AutoCorrect feature using VBA" /><category term="How to disable keys using VBA" /><category term="VBA Timer function" /><category term="VBA System Resolution" /><category term="Update Access AutoNumber Field using VBA" /><category term="Visual Basic Array Filters" /><category term="Adding Menu Items" /><category term="TemporaryFolder" /><category term="Add Command to Tools menu" /><category term="Convert Decimal to Percentage using VBA" /><category term="Copy Array to Excel Range usiong VSTO" /><category term="VBScript  Lock Computer" /><category term="Disable Macros using VBA" /><category term="Dates as array in VBA" /><category term="GetSystemMenu  Win API Function" /><category term="Object required 424 error" /><category term="How to call a VSTO Addin Function from VBA" /><category term="How to add format condition using Excel VBA" /><category term="Application.OnKey" /><category term="Check valid reference in the registry usingf VBa" /><category term="Kill Excel Process" /><category term="Adding to Popup menu" /><category term="ShowPivotTableFieldList Property in Excel VBA" /><category term="Exploded Pie Chart using Excel VBA" /><category term="VBA Update File Properties" /><category term="Word VBA Hide Field Codes" /><category term="VBA Excel ListBox Populate" /><category term="Uninstall Excel Addins using VBA" /><category term="Sort Files By Date using Excel VBA" /><category term="VBA Delete Module" /><category term="VBA CommandBars" /><category term="Compress Pictures/Images in Excel using VBA" /><category term="late binding" /><category term="disable popup menu" /><category term="Check Word Instance VBA" /><category term="Excel VBA check VBE mode" /><category term="LinkedTextBoxes in VBA" /><category term="Timer Control" /><category term="Unhide Rows using VBA" /><category term="SaveCopyAs" /><category term="Link Application Help with Program" /><category term="Excel as database for Query Table" /><category term="VBA Insert  Degrees Symbol" /><category term="Visual Basic" /><category term="Check Presence of AutoFilter in a Sheet PRogramatically" /><category term="Right Click Menu" /><category term="Kill Statement" /><category term="Evaluate Method" /><category term="Millisecond timer using VBA" /><category term="ActiveWorkbook.Breaklink" /><category term="Excel VBA Advanced Filter" /><category term="How to Configure Source Data of Pivot Table using VBA" /><category term="Calculate the End Date using Formula / VBA" /><category term="VBA RmDir  Method" /><category term="QueryDosDeviceW API Function" /><category term="TextBox Drag and Drop" /><category term="Excel VBA Mail" /><category term="Application.SaveWorkspace VBA" /><category term="Excel VBA ListObjects" /><category term="Add Legends to Chart using Excel VBA" /><category term="Multiple Return Parameters in VBA" /><category term="XML in Excel" /><category term="Command Bars in Excel" /><category term="Word VBA avoid Spell check dialog" /><category term="Protect Sheet using VBA" /><category term="Opening File using Common Dialog" /><category term="xlDialogSheet" /><category term="Programmatically update Database tables" /><category term="Excel VBA WorksheetFunction Transpose Function" /><category term="Set Word Options using VBA" /><category term="Check Directory Existence" /><category term="Outlook VBA Templates" /><category term="Compact MS Access Database using ADO" /><category term="How to make VB Application a Single Instance one" /><category term="Device Name" /><category term="Choose Function" /><category term="VBA Number of pages" /><category term="Text Box vbCRLf" /><category term="Use VB Application in VBA" /><category term="Sleep Function in Excel VBA" /><category term="VBA Create Popup menu" /><category term="FileCopy  Example" /><category term="Save All Open Workbooks using VBA" /><category term="How to prevent Content controls being deleted" /><category term="XML and VBA" /><category term="dynamic updation of Excel" /><category term="Excel 2010" /><category term="Extract Excel Properties" /><category term="Run Macro on Image Click" /><category term="Excel VBA Tag Italic Text" /><category term="Run a Macro from Different Workbook" /><category term="Excel VBA" /><category term="VBA Compare Documents" /><category term="ADO Connection string for Text File" /><category term="Formatting Text Files" /><category term="Minor and Major Operating System versions using VBA" /><category term="Excel VBA Applying Multiple Criteria in AutoFilter" /><category term="Filter Array Content" /><category term="File Handling Functions" /><category term="Launch PRogram from command" /><category term="Excel VBA AddFromFile" /><category term="Format Excel Cells using VBA" /><category term="Delete the entire folder using VBA" /><category term="Accessi" /><category term="Retrieve images of the Word document using VBA / Extract images in Word document into separate files using VBA" /><category term="Set Default no of Worksheets using Excel VBA" /><category term="Install Analysis ToolPak in Excel 2007" /><category term="VBA Get ASCII Value of an Character" /><category term="Copying Folders VBA" /><category term="SHFileOperation WinAPI Function" /><category term="Shared Name For the Drive" /><category term="Check if the Workbook is Read-Only" /><category term="Customizing VBA Project  properties" /><category term="Get Running Processes" /><category term="VBA code to No of Working days in a Year" /><category term="How to ignore AutoNumber field in VBA ADO" /><category term="Excel VBA Custom Properties Extraction" /><category term="Word to PDF using VBA" /><category term="Word Add-ins using VBA" /><category term="Automatically create Hyperlinks for all URLs in a document" /><category term="Excel VBA copy text to Word document" /><category term="VB File Exists" /><category term="VBA AddOLEControl Method" /><category term="Add AutoCorrect  Entries for Excel using VBA" /><category term="Send Multiple eMail" /><category term="How to enable Additional Controls in Tools menu - VBA" /><category term="Rset" /><category term="Kill Task using VBA" /><category term="Sort Table Columns using Word VBA" /><category term="Application.StatusBar" /><category term="Adding Command Button to Popup" /><category term="Connection String for Excel Database" /><category term="Fill Spaces VBA" /><category term="VBA Filter Function" /><category term="ADO control events using VBA" /><category term="Computer Name VB Function" /><category term="Copy matching data automatically through excel VBA" /><category term="VBA Saving Powerpoint" /><category term="Excel VBA SpecialCells Excel cell that contains formula couple" /><category term="Assigning Keyboard shortcuts through VBA" /><category term="Word Modeless Userform in VBA" /><category term="Delete Command Bar" /><category term="Outlook VBA IsTrusted" /><category term="Delete Word Temp Files VBA" /><category term="Adding Pictures to Header using Word VBA" /><category term="Microsoft Scripting Runtime" /><category term="Query Table with Excel as Data Source" /><category term="VBA Lock Computer" /><category term="RTF to PDF using VBA" /><category term="Copying folders in VBA using File System Object" /><category term="Automate Workbook Save" /><category term="FileSystemObject's ShareName" /><category term="Getobject Internet Explorer in VBA" /><category term="Visual Basic Dir Function" /><category term="Outlook VBA GetTable MEthod" /><category term="Get File Attributes - GetAttr" /><category term="check visibility of VBE code window using VBA" /><category term="Word VBA Hyphenation" /><category term="Check if Value exists Excel VBA" /><category term="Visual Basic Preserve keyword" /><category term="Create Excel VBA ListObjects" /><category term="Filter Webpages using VBA" /><category term="RemoveDocumentInformation Excel 2007 VBA" /><category term="Excel VBA NewSearch method" /><category term="Embed Word Document to Excel Sheet using Excel VBA" /><category term="Replace Contents in Excel automatically" /><category term="Outlook VBA StorageItem object" /><category term="EXCEl VBA AddIns" /><category term="Array.Sort function in Excel VBA. How to sort an Array in VBA. VBA Array Sort Function" /><category term="Track Revisions using VBA" /><category term="ListColumns in Excel VBA" /><category term="Excel Addins using VBA" /><category term="Convert Comments to Range Text using VBA" /><category term="File not closed error in VBA" /><category term="Create Access database using VBA" /><category term="PivotTableWizard method in Excel VBA" /><category term="VBA Speaker output" /><category term="Add ToolTipText in CommandBar" /><category term="Deletion of Images" /><category term="Program Word Document in Excel Sheet" /><category term="Visual Basic ToolTipText" /><category term="Embed Existing Word File to Spreadsheet using Excel VBA" /><category term="Scaling of Pictures / Images using Word VBA" /><category term="Excel VBA add  ActiveX control" /><category term="Word VBA Run method" /><category term="Import RTF file to Activedocument" /><category term="Calculate Workdays - Excel VBA" /><category term="display the embedded document as an Icon using VBA" /><category term="Excel VBA HasFormula" /><category term="Create Menu using VBA" /><category term="Calculation" /><category term="Check if Instance of Application is Running" /><category term="VBA Email" /><category term="TASKKILL function in VBA" /><category term="Automating Excel File Save" /><category term="Dynamically Create New User Form using VBA" /><category term="Excel VBA undo changes" /><category term="GetVersionEx  VBA" /><category term="enable right click menu" /><category term="Email Domain Separation" /><category term="Name Statement" /><category term="VBA NetworkDays" /><category term="Get File Name using VBA" /><category term="Get the Title property" /><category term="Creating an Excel Add-in" /><category term="Search Webpages using VBA" /><category term="Visual Basic Get Screen Height" /><category term="Run-time Errror 445 Object doesn't support this action in Application.FileSearch" /><category term="Bind Keys using Word VBA" /><category term="Format Excel Columns using VBA" /><category term="AutoSize" /><category term="Delete Temporary Files" /><category term="VBA Host Name" /><category term="Creating Excel TrendLine Chart using Excel VBA" /><category term="VBA ShowFieldCodes" /><category term="Word VBA Bookmarks" /><category term="File Size" /><category term="msgbox responses in VBA" /><category term="Export RichTextBox content as RTF file using VBA" /><category term="Call Method in Addin from Visual Basic Applications" /><category term="Lset" /><category term="Send Mail from Outlook" /><category term="Userform Draw Rectangle" /><category term="VBA and ADO" /><category term="VBA Link Macro to CommandBar" /><category term="Excel VBA Timer" /><category term="CommonDialog VBA" /><category term="Multiline TextBox" /><category term="Enable AutoRecovery using Word VBA" /><category term="Increase Speed of VBA" /><category term="Copy specific data automatically" /><category term="GetSystemMetrics" /><category term="VBA Change Pivot Table source data externally" /><category term="AllowEditRanges Excel VBA" /><category term="Browse Folder" /><category term="Add Slides VBA" /><category term="Flip Images" /><category term="How to Check Internet Connection using VBA" /><category term="Convert Used Range to an Excel Table using VBA" /><category term="IsError Function" /><category term="Extract Bold Range using Excel VBA" /><category term="Identify Objects that are linked to Source file using Excel VBA" /><category term="Set frequency of Autorecovery Save using VBA" /><category term="Automate Email" /><category term="Outlook VBA Extract Body content of Mails" /><category term="Outlook VBA" /><category term="Reading Text Files using VBA" /><category term="Calculate End date using VBA" /><category term="Download Code Image Range" /><category term="VBA EntireRow Property" /><category term="Create Database using ADO" /><category term="Add Controls Popup Menu using Powerpoint VBA. Add control to right-click menu using VBA" /><category term="asynchronous Speak" /><category term="Moving Log Files" /><category term="FindAll Function in Excel VBA" /><category term="SetAttr Function" /><category term="Validate Date between Ranges" /><category term="Replace Values of a Column" /><category term="Run-time error '1004': Unable to get the Add property of the AddIns class" /><category term="Excel VBA Delete Duplicate Rows" /><category term="VBA Compare Files by Date" /><category term="Find the Latest File" /><category term="File System Object" /><category term="Uninstall Word Templates (Addins / .DOT files) using VBA" /><category term="Dynamic Addition of command to tools menu. Adding Command Button to Tools" /><category term="VBA Get Active Internet Explorer" /><category term="Identify Out of Office using Outlook VBA" /><category term="ADO DataControl" /><category term="How to get milliseconds in VBA Now() function" /><category term="VBA Confirm Internet Connection" /><category term="Pivot Tables and VBA" /><category term="Run-time Error 55 File already open" /><category term="Disable Close Button using VBA" /><category term="Creating Log Files" /><category term="How to get embedded Word object" /><category term="VBA Insert  Yen Sign" /><category term="GetAttr Function" /><category term="VBA Customize Command Bar" /><category term="Decrease Shapes" /><category term="select a Shell folder" /><category term="Convert Format to Tags using Word VBA" /><category term="Excel VBA format characters within a text string" /><category term="VBA Latest File" /><category term="Make the file Hidden" /><category term="Disable Popup Menu Items" /><category term="Extract Character Styles Word VBA" /><category term="Word VBA RunAutoMacro method" /><category term="Linking Text Box to Excel Range using VBA" /><category term="Add Columns to Excel List Object using VBA" /><category term="Array Function in VBA" /><category term="Update Tool Tip Text in Run time" /><category term="Speech to Text using VBA" /><category term="Write Configuration Files using VBA" /><category term="VBA Decimal to Hexadecimal Conversion" /><category term="How to get Free Disk Space using VBA" /><category term="Dialogsheets" /><category term="VBA WeekdayName Function" /><category term="Delete unwanted Word Templates (Addins / .DOT files) using VBA" /><category term="Excel VBA SpecialCells Numerals" /><category term="RemovePeriods Method Powerpoint VBA" /><category term="Write INI files using VBA" /><category term="Use Autofilter in VBA" /><category term="Add Shapes to Headers using Word VBA" /><category term="Find Image Range - Excel" /><category term="VBA Format Cells" /><category term="Excel VBA Path property" /><category term="Open Text File using ADO" /><category term="Extract Italic Range using Excel VBA" /><category term="Word VBA get Track Revision Details" /><category term="VBA use Excel As Database" /><category term="Manipulating Excel Ranges using VBA" /><category term="Calculate Last Day of the Month" /><category term="Share Name" /><category term="Check Folder Existence VBA" /><category term="Delete Images from Spreadsheets" /><category term="Query Table with Text File as Data Source" /><category term="VBA FileSystemObject" /><category term="VBA Delete Files" /><category term="Extract Formula using VBA" /><category term="Connect to Website from Excel VBA" /><category term="Add Content Controls using VBA" /><category term="Reducing Size of Microsoft Access Database" /><category term="VBA Application.Filesearch Error" /><category term="Kill Word Process" /><category term="VBA GetObject" /><category term="Visual Basic Get File Size" /><category term="Choose the Values" /><category term="Insert Procedure to a Module Using VBComponents" /><category term="VBA alter Automation Security" /><category term="Customizing VBA editor using VBA" /><category term="Document Conversion" /><category term="LockWorkStation VBS" /><category term="Could not find installable ISAM" /><category term="Excel ADO" /><category term="Visual Basic Get Computer Name" /><category term="VBA Save Workbook" /><category term="Function keys as Shortcut Keys in VB" /><category term="VBA Open Windows Explorer" /><category term="Unprotect Sheet using VBA" /><category term="Terminate Excel Process using VBA" /><category term="Retrieve Command Line Arguments" /><category term="Extract Cells Containing Numbers alone using Excel VBA" /><category term="Excel Range to JPG using VBa" /><category term="Word Check Compatibility" /><category term="Return Multiple Values – VBA Function" /><category term="Add Word Addins using VBA" /><category term="IsMissing Doesn't Work" /><category term="Show all running processes using WinAPI" /><category term="OnAction Property" /><category term="Match Excel Column a Range" /><category term="Excel VBA Scroll to a Range" /><category term="Server-side automation" /><category term="Visual Basic Open a Folder in Windows Explorer How to Open Explorer Window using VBA" /><category term="Visual Basic Drag and DRop Files to Text Box" /><category term="Adding to Tools menu" /><category term="Excel VBA Application.GoTo" /><category term="Adding Default Chart to a Sheet using Excel VBA" /><category term="Outlook VBA Mailitem" /><category term="Play Audio File using Excel VBA" /><category term="How to Increase / Decrease Size of Pictures in Word Document using VBA" /><category term="Get the LOGON SERVER" /><category term="Word document - get figure width using Word VBA" /><category term="VBA Check File Availability" /><category term="Send Mail from Lotus Notes" /><category term="Exclude Holidays in Networking days" /><category term="Get First Row of Excel AutoFilter using VBA" /><category term="Excel Delete Rows" /><category term="break the links to external source" /><category term="Word Table Sort using VBA" /><category term="Add Control to CommandBar" /><category term="Operating System using VBA" /><category term="Pick the Value from the array" /><category term="Excel VBA Remove Duplicate Rows" /><category term="Edit Linked Objects in VBA" /><category term="Lock and Unlock cells using VBA" /><category term="Access 2007 Insert Data using VBA" /><category term="Limit Text Box Length" /><category term="Delete Temporary Files VBA" /><category term="Characters object" /><category term="How to make VB Exe as a Single Instance one" /><category term="Excel VBA InputBox" /><category term="VBA Opening Text Files" /><category term="Compact MS Access Database using VBA (ADO Code)" /><category term="EXcel VBA LinkSources" /><category term="ADO in Excel" /><category term="Creating a Command Button on Sheet using Excel VBA" /><category term="Create New Module using VBA" /><category term="VBA Filtering Array Content" /><category term="Excel as Database" /><category term="VBA Create Menu" /><category term="Disabling Excel events" /><category term="VB Forms Function keys" /><category term="Get The Name of Drive using VBA" /><category term="Extract Paragraph Styles Word VBA" /><category term="VBA Insert  Plus Minus Symbol" /><category term="Lotus Notes VBA" /><category term="Select value from Array" /><category term="Set Chart postion programatticaly using Excel VBA" /><category term="VBA Windows Folder Path" /><category term="Orientation of CElls" /><category term="Sort Text in Word Table using Word VBA" /><category term="How to clean Office Solution from Visual Studio" /><category term="Visual Basic Command Line Arguments" /><category term="VBA Insert  Multiplication Sign Symbol" /><category term="Excel VBA PivotCache" /><category term="enable Developer Tab in Office 2010" /><category term="Word VBA convert to PDF" /><category term="Word VBA MeaningList" /><category term="Show Print Setup Dialog using VBA" /><category term="VBA Input Function Example" /><category term="No of occurrences using Find Method Excel VBA" /><category term="BuiltinDocumentProperties" /><category term="Delete Word Backup files using Word VBA" /><category term="Powerpoint VBA" /><category term="Microsoft Internet Controls - VBA Reference" /><category term="VBA  Move File" /><category term="Save Excel Selection as Image using VBA. How to export Excel Range as Image" /><category term="Show Revisions using Word VBA" /><category term="VBA Input # Statement Example" /><category term="Excel VBA -  keywords" /><category term="Embed PDF Document in Excel/Word using VBA" /><category term="How to copy text from Excel Range to Word bookmark" /><category term="No of Worksheets using Excel VBA" /><category term="Excel VBA code" /><category term="Get Temporary Folder" /><category term="VBA shortcut assignment" /><category term="EXcel VBA Userform Draw Rectangle" /><category term="Extract all Linked Objects in Excel Spreadsheet using VBA" /><category term="Word VBA get Height of Figures" /><category term="Word VBA Mark Index" /><category term="VBA Decimal to Octal Conversion" /><category term="Function to Fill Characters VB" /><category term="1004 -- The file could not be accessed" /><category term="Word VBA Insert Fields" /><category term="Expand Ranges using Word VBA" /><category term="VBA Shapes" /><category term="FileSystemObject" /><category term="Route message to speaker in VBA" /><category term="VBA Pivot Table source" /><category term="VBA Function to Restart Windows" /><category term="VBA CommonDialog Filters" /><category term="File Modification Time" /><category term="How to insert value in a range using VSTO" /><category term="Appending Text Files using VBA" /><category term="ADO Connection string for CSV File" /><category term="Disallow user interaction - Excel VBA" /><category term="Replace Function in VBA Example" /><category term="VBA Creation date" /><category term="Excel VBA Dropdowns" /><category term="Programmaticaly search text in Google" /><category term="Word VBA There are too many spelling or grammatical errors dialog" /><category term="GetOpenFilename Method" /><category term="Get Path of Linked Objects using Word VBA" /><category term="insert field in Word 2007" /><category term="VB6 Temporary Folder" /><category term="Array of Objects in VBA" /><category term="VBA Milliseconds" /><category term="Identify Underlined text throughout the document using Word VBA" /><category term="QueryTable object in Excel VBA" /><category term="VBA Computer Name" /><category term="FileSystemObject Copyfolder" /><category term="SelfCert.EXe" /><category term="Speedup Excel Macros" /><category term="Visual Basic Forms Keypreview  property" /><category term="Word VBA Exists Method" /><category term="Remove Images" /><category term="Search Formatted Text using Excel VBA" /><category term="Delete Module using VBA" /><category term="EXcel VBA AddFromString" /><category term="Office 2010" /><category term="Repair Workbook using VBA" /><category term="Delete Entire Row" /><category term="Word VBA FreeDiskSpace property" /><category term="Creating Excel Pie Chart using Excel VBA" /><category term="CommandBars in Powerpoint using VBA" /><category term="Identify Browser Version using Excel VBA" /><category term="Visual Basic ASC functiion" /><category term="Clear Excel Status Bar  using VBA" /><category term="Application.InputBox" /><category term="Identify Range Containing Formula using Excel VBA" /><category term="Modeless Userform in VBA" /><category term="Visual Basic array dimension" /><category term="VBA Create Module" /><category term="SQL Server 2005 Express Connection through VBA" /><category term="Excel VBA Tag Bold Text" /><category term="Excel Format Images" /><category term="DateDiff Function Example" /><category term="Excel 2003 Delete Comments" /><category term="Compare Word Documents" /><category term="Pivot Table from New Pivot Cache using Excel VBA" /><category term="FileSystemObject GetDriveName" /><category term="Identify Raneg of the Image/Shape" /><category term="EXcel VBA Protection of VB Project" /><category term="Check Date Range" /><category term="Get The Devic eName using VBA" /><category term="Download Office 2010" /><category term="Shell Functions" /><category term="Export Word Range as RTF using VBA" /><category term="Word VBA" /><category term="Dynamic Time" /><category term="VBComponents" /><category term="EndOfDoc Bookm arks Word VBA" /><category term="install an Excel Add-in using VBA" /><category term="Excel VBA Pivot Tables" /><category term="HTML Help" /><category term="get the list of directories or files using VBA Dir  Function" /><category term="Add a new column to Excel Table using VBA" /><category term="Excel Cell Orientation" /><category term="Ignore Weekends" /><category term="Save As dialog box" /><category term="Execute Visual Basic Program from Command Line" /><category term="VBA OnTime Method" /><category term="BottomRightCell" /><category term="Windows API Get Screen Area" /><category term="Application.Interactive in Excel VBA" /><category term="Word VBA Selection.Information" /><category term="Use Visual Basic .NET or C# Functions in VBA" /><category term="VB Function Get Temp Folder" /><category term="Validate and revert changes to an Excel Range using VBA" /><category term="Openworkspace Excel VBA" /><category term="Mark Selected Text as an Index Entry (Word VBA)" /><category term="VBA Now() function" /><category term="VBA Convert Ranges to Text" /><category term="Programming Word TextBoxes using VBA" /><category term="How to Check Internet Connectivity using VBA" /><category term="Microsoft Internet Controls VBA" /><category term="Query Excel Data effectively" /><category term="Excel VBA Show Unique Rows" /><category term="Excel VBA DataBodyRange" /><category term="Autotagging Word VBA" /><category term="Speedup VBA Performance" /><category term="Make the file Read-Only" /><category term="Outlook VBA Store Hidden Data" /><category term="Excel VBA Copy function" /><category term="EoMonth Worksheet Function" /><category term="VBA Delete Images" /><category term="Excel VBA Autofilter" /><category term="Excel VBA Detect Duplicate Values" /><category term="Format Shapes" /><category term="Dir Function in VBA" /><category term="TopLeftCell" /><category term="VBA Detach Module to Workbook" /><category term="Uninstall Word Addins using VBA" /><category term="Excel VBA Autofilter- Only Last Value of the Array" /><category term="ADO SQL Server 2005 Express" /><category term="FileLen" /><category term="Excel Height of Row" /><category term="Check if a workbook is Saved using Excel VBA" /><category term="Extract TextBoxes using VBA" /><category term="Execute Word Macro on File Open" /><category term="Saves a copy of the workbook" /><category term="Use Image Click to Execute Macro" /><category term="RowHeight using Excel VBA" /><category term="Set Auto Recovery Duration using VBA" /><category term="Delete Word Addins using VBA" /><category term="Excel Chart to GIF Conversion using VBA" /><category term="VBA Attach Module to Workbook" /><category term="Visual Basic GetObject" /><category term="Excel VBA Combo Boxes" /><category term="Extract First Row of the Filtered Range using Excel VBA" /><category term="Run a Macro in a Different Workbook" /><category term="Control Excel from Powerpoint using VBA" /><category term="Open Downloaded Web Pages in Word/Excel using VBA" /><category term="Word VBA Convert Symbols to Entities" /><category term="Using Excel as Database" /><category term="How to undo an action using Excel VBA" /><category term="Excel VBA Tag Color Text" /><category term="Developer tab on Ribbon (Excel)" /><category term="Split Function VBA" /><category term="ListObjects in Excel VBA" /><category term="get the list of directories or files using VBA Functions" /><category term="VBA to edit embedded Excel sheet" /><category term="Add Combo Box to the command Bar" /><category term="VSTO Addins" /><category term="VBA scheduling procedure" /><category term="VBA GetOpenFilename Method" /><category term="Rotate Images" /><category term="Case sensitive comparison" /><category term="Excel VBA add Code Modules" /><category term="VBA Decimal to percent" /><category term="Extract References of a VBA Project" /><category term="simulate speech Echo in VBA" /><category term="Word VBA Set / Reset TrackRevisons" /><category term="Excl macro copy matching rows" /><category term="Delete Control From CommandBar" /><category term="How to insert data to Access 2007 database  using VBA" /><category term="Changing File Attributes" /><category term="Identify End of Document using Word VBA" /><category term="Word VBA Show Field Codes" /><category term="How to create event procedures in VBA for ADO connection" /><category term="Use Images as Command Buttons" /><category term="Permanently hide worksheet from user using VBA" /><category term="disable right click" /><category term="Dynamically Draw Rectangle in UserForm" /><category term="Visual Basic Get Screen Width" /><category term="Programmatically Identify cells containing Formula" /><category term="Delete Empty Rows in Excel" /><category term="Create Pivot Table using Excel VBA" /><category term="Resizing Text Boxes" /><category term="VBA Save Chart as Images" /><category term="Hide Excel Status Bar" /><category term="asynchronous voice messages using VBA" /><category term="Excel VBA ListColumn" /><category term="Extract File Names using VBA" /><category term="Transposign an Array" /><category term="Excel Database ADO" /><category term="Move Batch Files using VBA" /><category term="FileSystemObject GetDrive" /><category term="RefreshTable VBA" /><category term="Mail Automation" /><category term="Powerpoint VBA Delete End Points" /><category term="Excel Modeless Userform in VBA" /><category term="Excel VBA BuiltIn property" /><category term="VBA Create Database" /><category term="VBA Collections" /><category term="MaxLength  Property" /><category term="WorksheetFunction.EoMonth" /><category term="How to retrieve free space available using VBA" /><category term="Creating Microsoft Access database on the fly using VBA" /><title>VBA Tips &amp; Tricks</title><subtitle type="html">Welcome to VBA Tips &amp; Tricks.

All VBA related information will be posted on this blog. Of late, VBA has been disregarded by many software professionals for .Net, c# and other technologies. This blog will also post articles related to them too

Happy reading</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://vbadud.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>328</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/oKPC" /><feedburner:info uri="blogspot/okpc" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0AFR3s5fCp7ImA9WhRUEUs.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-931236361770751924</id><published>2012-01-21T08:01:00.000-08:00</published><updated>2012-01-21T08:01:56.524-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-21T08:01:56.524-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Add Legends to Chart using Excel VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Chartwizard method in Excel VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Creating Excel TrendLine Chart using Excel VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="ChartWizard in Excel VBA" /><title>How to create a Trendline Chart using Excel VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red;"&gt;Excel VBA - Trendline Charts&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Here are some snippets useful to create a TrendLine Chart in Excel&lt;br /&gt;
&lt;br /&gt;
Have used the entire data from the given sheet to create the chart. Have used the UsedRange function to get that.&lt;br /&gt;
&lt;br /&gt;
If you want to have a specified range you can pass that also&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue;"&gt;Sub Create_TrendLine_Chart_Excel_2003(ByRef oRep As Worksheet, ByVal iLeft As Double, ByVal iTop As Double, ByVal sChartTitle As String, ByRef oSource As Range)&lt;br /&gt;
Dim oChts As ChartObjects&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '* Chart Object Collection&lt;br /&gt;
Dim oCht As ChartObject&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '* Chart Object&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&gt;On Error GoTo Err_Chart&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oChts = oRep.ChartObjects&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oCht = oChts.Add(iLeft, iTop, 400, 450)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.SetSourceData oSource, PlotBy:=xlColumns&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.ChartType = xlLineMarkers&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.ChartTitle.Text = sChartTitle&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Legend.Position = xlLegendPositionRight&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasAxis(XlAxisType.xlCategory) = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlCategory, xlPrimary).HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlCategory, xlPrimary).AxisTitle.Characters.Text = ""&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasAxis(XlAxisType.xlValue) = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlValue, xlPrimary).HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlValue, xlPrimary).AxisTitle.Text = "Percentage Done" '.Axes(Type:=XlAxisType.xlValue).AxisTitle.Text = "% Done"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlValue).MaximumScale = 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlCategory).TickLabelSpacing = 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlCategory).TickLabels.Font.Size = 8&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'oCht.Chart.SetElement (msoElementPrimaryCategoryGridLinesMajor)&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not oCht Is Nothing Then Set oCht = Nothing&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not oChts Is Nothing Then Set oChts = Nothing&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue;"&gt;Err_Chart:&lt;br /&gt;
If Err &amp;lt;&amp;gt; 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Debug.Assert Err = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Debug.Print Err.Description&lt;br /&gt;
&amp;nbsp;&amp;nbsp; If Err.Number = 94 Then&amp;nbsp; 'Invalid Use of Null Error&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
End If&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
For some reason the above was creating a problem in Excel 2007 and above. Hence created a separate snippet for it&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue;"&gt;Sub Create_TrendLine_Chart_Excel_2007(ByRef oRep As Worksheet, ByVal iLeft As Double, ByVal iTop As Double, ByVal sChartTitle As String)&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&gt;Dim oChts As ChartObjects&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '* Chart Object Collection&lt;br /&gt;
Dim oCht As ChartObject&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '* Chart Object&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&gt;On Error GoTo Err_Chart&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oChts = oRep.ChartObjects&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oCht = oChts.Add(iLeft, iTop, 400, 450)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.ChartWizard Source:=oRep.UsedRange&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.ChartType = xlLineMarkers&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.ChartTitle.Text = sChartTitle&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Legend.Position = xlLegendPositionRight&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasAxis(XlAxisType.xlCategory) = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlCategory, xlPrimary).HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlCategory, xlPrimary).AxisTitle.Characters.Text = ""&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasAxis(XlAxisType.xlValue) = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlValue, xlPrimary).HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlValue, xlPrimary).AxisTitle.Text = "Percentage Done" '.Axes(Type:=XlAxisType.xlValue).AxisTitle.Text = "% Done"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlValue).MaximumScale = 1&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'oCht.Chart.SetElement (msoElementPrimaryCategoryGridLinesMajor)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue;"&gt;Err_Chart:&lt;br /&gt;
If Err &amp;lt;&amp;gt; 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Debug.Assert Err = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Debug.Print Err.Description&lt;br /&gt;
&amp;nbsp;&amp;nbsp; If Err.Number = 94 Then&amp;nbsp; 'Invalid Use of Null Error&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
End If&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: orange;"&gt;ChartType = xlLineMarkers&lt;/span&gt; makes this Chart a &lt;strong&gt;TrendLine&lt;/strong&gt;. You can try your luck by selecting other types&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-931236361770751924?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ysTYbrziJFyhVoq4JLHOL_Lf8ho/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ysTYbrziJFyhVoq4JLHOL_Lf8ho/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ysTYbrziJFyhVoq4JLHOL_Lf8ho/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ysTYbrziJFyhVoq4JLHOL_Lf8ho/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/1DHQR4xjXaI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/931236361770751924/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2012/01/how-to-create-trendline-chart-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/931236361770751924?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/931236361770751924?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/1DHQR4xjXaI/how-to-create-trendline-chart-using.html" title="How to create a Trendline Chart using Excel VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/01/how-to-create-trendline-chart-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UMSHoyeSp7ImA9WhRTFUo.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-4170932246706792565</id><published>2011-11-06T03:34:00.000-08:00</published><updated>2011-11-06T03:34:49.491-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-06T03:34:49.491-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VBA Extract Properties" /><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Custom Properties Extraction" /><title>How to Extract Properties from Excel/Word without Opening File using VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red; font-size: large;"&gt;How to get CustomProperties from Excel Workbook/Word Document (VBA) without physically opening the file&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many cases where we need to get the document property without the file being opened in VBA. &lt;br /&gt;
&lt;br /&gt;
This can be achieved by using the objects available in DSOFile.dll. This file can be downloaded from &lt;a href="http://support.microsoft.com/kb/224351"&gt;http://support.microsoft.com/kb/224351&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Once this downloaded and installed. You need to add a reference to DSO Ole Document's property library (refer image below)&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-tFr7Qkbomic/TnxKFfE5VoI/AAAAAAAAEAA/K0hzGgKD55U/s1600/VBA+Microsoft+DSO+File+-+Used+to+Read+Properties+of+Excel+Word+without+opening.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="542" src="http://1.bp.blogspot.com/-tFr7Qkbomic/TnxKFfE5VoI/AAAAAAAAEAA/K0hzGgKD55U/s640/VBA+Microsoft+DSO+File+-+Used+to+Read+Properties+of+Excel+Word+without+opening.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Function GetPropFromDSO(ByVal sFile As String, ByVal sCP As String) As String

Dim oFil As DSOFile.OleDocumentProperties
Dim oCP As DSOFile.CustomProperties

On Error GoTo Err_Tp
    
    Set oFil = New OleDocumentProperties
    
    oFil.Open sFile, True
    
    Set oCP = oFil.CustomProperties
    GetRevFromDSO = oCP(sCP)
.Value    
    oFil.Close

Err_Tp:
If Err &amp;lt;&amp;gt; 0 Then
    Err.Clear
    Resume Next
End If

End Function
&lt;/pre&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="vb" name="code"&gt;The function gets the Filename and the Property to be extracted and returns the property value.&lt;/div&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="vb" name="code"&gt;Here are some important custom properties&lt;/div&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="vb" name="code"&gt;How to know if a Excel Workbook has Macro without opening it&lt;/div&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-4170932246706792565?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/54VKldLqd2UWYpd4qhbQCRQqLT0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/54VKldLqd2UWYpd4qhbQCRQqLT0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/54VKldLqd2UWYpd4qhbQCRQqLT0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/54VKldLqd2UWYpd4qhbQCRQqLT0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/s-xyg07gqAY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/4170932246706792565/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2011/11/how-to-extract-properties-from.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4170932246706792565?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4170932246706792565?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/s-xyg07gqAY/how-to-extract-properties-from.html" title="How to Extract Properties from Excel/Word without Opening File using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-tFr7Qkbomic/TnxKFfE5VoI/AAAAAAAAEAA/K0hzGgKD55U/s72-c/VBA+Microsoft+DSO+File+-+Used+to+Read+Properties+of+Excel+Word+without+opening.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2011/11/how-to-extract-properties-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04GR30zeip7ImA9WhdWE08.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-8223059977205586040</id><published>2011-09-06T09:18:00.000-07:00</published><updated>2011-09-06T09:18:46.382-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-06T09:18:46.382-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Populate Userform with Excel Range using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="VBA Excel ListBox Populate" /><title>How to link Excel Table to ListBox using VBA</title><content type="html">&lt;b&gt;Fill a ListBox from Excel Table using VBA / Populate a ListBox from Excel Table using VBA&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Let us take a Excel table as shown below - a list of Top 10 All time hits .&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3Ze10Xd-9BQ/TmZFPDh8OmI/AAAAAAAAD6I/PgMdA6gz8X4/s1600/Excel%2BTable%2Bto%2BListbox.png" imageanchor="1"&gt;&lt;img border="0" height="360" src="http://1.bp.blogspot.com/-3Ze10Xd-9BQ/TmZFPDh8OmI/AAAAAAAAD6I/PgMdA6gz8X4/s640/Excel%2BTable%2Bto%2BListbox.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Let us assume that we need to populate the Listbox with values from Column 2&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Xx_RrFAWMQo/TmZFPHExltI/AAAAAAAAD6Q/5MplIrH5FJA/s1600/Excel%2BTable%2Bto%2BListbox%2B2.png" imageanchor="1"&gt;&lt;img border="0" height="250" src="http://2.bp.blogspot.com/-Xx_RrFAWMQo/TmZFPHExltI/AAAAAAAAD6Q/5MplIrH5FJA/s400/Excel%2BTable%2Bto%2BListbox%2B2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The following code will help you populate the data&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Dim oWS As Worksheet
    Set oWS = ThisWorkbook.Sheets(3)
    Me.ListBox1.List = oWS.ListObjects(1).ListColumns("Title").DataBodyRange.Value
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-m2H_ATs8ZJs/TmZFPY1LSEI/AAAAAAAAD6Y/OpVqVY3EKos/s1600/Excel%2BTable%2Bto%2BListbox%2B3.png" imageanchor="1"&gt;&lt;img border="0" height="252" src="http://1.bp.blogspot.com/-m2H_ATs8ZJs/TmZFPY1LSEI/AAAAAAAAD6Y/OpVqVY3EKos/s400/Excel%2BTable%2Bto%2BListbox%2B3.png" width="332" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-8223059977205586040?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9SWRrtBYYjR3IEwOf8zMm9THaU4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9SWRrtBYYjR3IEwOf8zMm9THaU4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9SWRrtBYYjR3IEwOf8zMm9THaU4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9SWRrtBYYjR3IEwOf8zMm9THaU4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/YQc4cowhXpk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/8223059977205586040/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2011/09/how-to-link-excel-table-to-listbox.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8223059977205586040?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8223059977205586040?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/YQc4cowhXpk/how-to-link-excel-table-to-listbox.html" title="How to link Excel Table to ListBox using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-3Ze10Xd-9BQ/TmZFPDh8OmI/AAAAAAAAD6I/PgMdA6gz8X4/s72-c/Excel%2BTable%2Bto%2BListbox.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2011/09/how-to-link-excel-table-to-listbox.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQNRno9fCp7ImA9WhZVE0o.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-2391751024296306112</id><published>2011-05-25T19:53:00.000-07:00</published><updated>2011-05-25T19:53:17.464-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-25T19:53:17.464-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VBA XCOPY Function" /><category scheme="http://www.blogger.com/atom/ns#" term="Shell Functions" /><category scheme="http://www.blogger.com/atom/ns#" term="Copy Files using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Move Batch Files using VBA" /><title>How to XCOPY files using VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red; font-size: large;"&gt;How to copy set of files from one folder to another using VBA / How to run DOS Commands in VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
After a long hibernation I am posting in this blog, thanks to Yaswi. &lt;br /&gt;
&lt;br /&gt;
There is nothing like using the command prompt. This gives a good satisfaction for any programmer / administrator as s/he moves around the files, typing the commands etc&lt;br /&gt;
&lt;br /&gt;
Here is a simple code that moves all the files from one folder to another using XCOPY. You can use all the options of XCOPY with VBA&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;Sub Copy_Bunch_Of_Files()

Shell "cmd /c xcopy /y c:\temp\*.* C:\Temp\Backup"

End Sub
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-2391751024296306112?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uIXjZL2a1uZpO86GV90fbX-ktF8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uIXjZL2a1uZpO86GV90fbX-ktF8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uIXjZL2a1uZpO86GV90fbX-ktF8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uIXjZL2a1uZpO86GV90fbX-ktF8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/Rupcoxe_4CM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/2391751024296306112/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2011/05/how-to-xcopy-files-using-vba.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2391751024296306112?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2391751024296306112?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/Rupcoxe_4CM/how-to-xcopy-files-using-vba.html" title="How to XCOPY files using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2011/05/how-to-xcopy-files-using-vba.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQMRHc8eSp7ImA9Wx5XE0k.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-2347557339804974498</id><published>2010-09-12T20:26:00.000-07:00</published><updated>2010-09-12T20:26:25.971-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-12T20:26:25.971-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Export RichTextBox content as RTF file using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Import RTF file to Activedocument" /><title>How to copy RichTextBox contents to Word document</title><content type="html">&lt;span style="color: orange; font-size: large;"&gt;&lt;strong&gt;How to insert Rich Text Box Content to Word document using VBA&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Let us have a form with a RichTextBox and a Command Button as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_s2jU7girbyM/TI2ZV8NFqwI/AAAAAAAACxw/aTfOwMpgM2k/s1600/Rich+Text+2+Word+VBA.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" ox="true" src="http://4.bp.blogspot.com/_s2jU7girbyM/TI2ZV8NFqwI/AAAAAAAACxw/aTfOwMpgM2k/s320/Rich+Text+2+Word+VBA.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The following VBA code will copy the Contents of RichTextBox to the First Paragraph of the ActiveDocument&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Private Sub cmdCopyRTFContent_Click()
    
    Dim oRange As Word.Range            ' Word Range
    Dim sPath As String                 ' Temp Path
    
    Set oRange = ActiveDocument.Paragraphs(1).Range
    
    sPath = "c:\shasurdata\Temp.rtf"
    
    Open sPath For Output As 1
        Print #1, RichTextBox1.TextRTF
    Close #1
    
    oRange.ImportFragment sPath
    
End Sub

&lt;/pre&gt;&lt;br /&gt;
The program Exports the contents of RichTextBox to a RTF file and then imports to the Word document&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-2347557339804974498?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/E8wzJqk4K9LlePDsf4epr0bsONs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/E8wzJqk4K9LlePDsf4epr0bsONs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/E8wzJqk4K9LlePDsf4epr0bsONs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/E8wzJqk4K9LlePDsf4epr0bsONs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/wr4ree1XxkY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/2347557339804974498/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/09/how-to-copy-richtextbox-contents-to.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2347557339804974498?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2347557339804974498?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/wr4ree1XxkY/how-to-copy-richtextbox-contents-to.html" title="How to copy RichTextBox contents to Word document" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_s2jU7girbyM/TI2ZV8NFqwI/AAAAAAAACxw/aTfOwMpgM2k/s72-c/Rich+Text+2+Word+VBA.PNG" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/09/how-to-copy-richtextbox-contents-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQHR3k-eSp7ImA9Wx5RF08.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-5818410170988345019</id><published>2010-08-25T00:12:00.000-07:00</published><updated>2010-08-25T00:12:16.751-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-25T00:12:16.751-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Get Path of Linked Objects using Word VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Edit Linked Objects in VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Accessi" /><title>How to edit Linked Objects using Word VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: orange; font-size: large;"&gt;How to open and edit Linked Excel files from Word using VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
One can insert an object in word by either linking or embedding. We have already seen &lt;a href="http://vbadud.blogspot.com/2010/08/how-to-read-excel-sheet-embedded-in.html"&gt;How to Read and Edit Embedded objects using VBA&lt;/a&gt;, The following code will throw light on accessing a linked object from Word (Excel sheet) and editing the same.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Edit_Linked_Excel_Objects()




Dim oXL As Excel.Application ' Excel App Object

Dim oWB As Excel.Workbook ' Workbook Object

Dim sWB As String ' Linked String

Dim oIShape As InlineShape ' Inline Shape Object



On Error GoTo Err_Report



Set oXL = New Excel.Application



For Each oIShape In ActiveDocument.InlineShapes

If InStr(1, oIShape.OLEFormat.ProgID, "Excel") Then



' Check if the Object is Linked

If oIShape.Type = wdInlineShapeLinkedOLEObject Then



' Get the Source Name of Linked Workbook

sWB = oIShape.LinkFormat.SourceFullName



If Len(Dir(sWB)) &amp;lt;&amp;gt; 0 Then

Set oWB = oXL.Workbooks.Open(sWB, , False)

oWB.Sheets(1).Range("A1").Value = "ID"

oWB.Save

oWB.Close False

oIShape.LinkFormat.Update

Else

MsgBox "Linked file not found"

End If

End If

End If







Next oIShape



Finally:



oXL.Quit

If Not oXL Is Nothing Then Set oXL = Nothing

If Not oWB Is Nothing Then Set oWB = Nothing

If Not oIShape Is Nothing Then Set oIShape = Nothing



Exit Sub

Err_Report:

MsgBox Err.Description &amp;amp; " - " &amp;amp; Err.Number

Err.Clear

GoTo Finally



End Sub


&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-5818410170988345019?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pN_zvPMJAjg_qRMjj5sUesNCIYg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pN_zvPMJAjg_qRMjj5sUesNCIYg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pN_zvPMJAjg_qRMjj5sUesNCIYg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pN_zvPMJAjg_qRMjj5sUesNCIYg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/qtc_24ujPi0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/5818410170988345019/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/08/how-to-edit-linked-objects-using-word.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/5818410170988345019?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/5818410170988345019?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/qtc_24ujPi0/how-to-edit-linked-objects-using-word.html" title="How to edit Linked Objects using Word VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/08/how-to-edit-linked-objects-using-word.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08NRnw5eyp7ImA9Wx5RE0Q.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-8111440351525399387</id><published>2010-08-21T06:04:00.000-07:00</published><updated>2010-08-21T06:04:57.223-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-21T06:04:57.223-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hide / Unhide Sheet Tab using Excel VBA" /><title>Hide Sheet Tabs using VBA / Hide Excel Sheet Tabs (2007/2010)</title><content type="html">&lt;strong&gt;How to Hide Excel Sheet Names using VBA&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;If you want to hide the Sheet Tab (as shown below) you can do that using Excel Options&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_s2jU7girbyM/TG_N6fJr5LI/AAAAAAAACvQ/gjaiZq08W1I/s1600/VBA_Hide_SheetTabs+2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="380" ox="true" src="http://2.bp.blogspot.com/_s2jU7girbyM/TG_N6fJr5LI/AAAAAAAACvQ/gjaiZq08W1I/s640/VBA_Hide_SheetTabs+2.PNG" width="640" /&gt;Hide / Unhide Sheet Tab using Excel VBA&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;Uncheck the Show sheet tabs checkbox from Advanced Tab of Options Menu&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_s2jU7girbyM/TG_N0qNwMeI/AAAAAAAACvI/QUmRRqC3JRA/s1600/VBA_Hide_SheetTabs.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="458" ox="true" src="http://4.bp.blogspot.com/_s2jU7girbyM/TG_N0qNwMeI/AAAAAAAACvI/QUmRRqC3JRA/s640/VBA_Hide_SheetTabs.PNG" width="640" /&gt;Hide / Unhide Sheet Tab using Excel VBA&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can do the same through Excel VBA&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;ActiveWindow.DisplayWorkbookTabs = False
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-8111440351525399387?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/X8kfsBARGYOM0_6bBmYRMvC_Ekg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/X8kfsBARGYOM0_6bBmYRMvC_Ekg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/X8kfsBARGYOM0_6bBmYRMvC_Ekg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/X8kfsBARGYOM0_6bBmYRMvC_Ekg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/w0oxDZdUQTQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/8111440351525399387/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/08/hide-sheet-tabs-using-vba-hide-excel.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8111440351525399387?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8111440351525399387?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/w0oxDZdUQTQ/hide-sheet-tabs-using-vba-hide-excel.html" title="Hide Sheet Tabs using VBA / Hide Excel Sheet Tabs (2007/2010)" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_s2jU7girbyM/TG_N6fJr5LI/AAAAAAAACvQ/gjaiZq08W1I/s72-c/VBA_Hide_SheetTabs+2.PNG" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/08/hide-sheet-tabs-using-vba-hide-excel.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8DSH0zfCp7ImA9Wx5XE0k.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-7404827927108873319</id><published>2010-08-06T20:24:00.000-07:00</published><updated>2010-09-12T20:17:59.384-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-12T20:17:59.384-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="How to search embedded Excel using Word VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="VBA to edit embedded Excel sheet" /><category scheme="http://www.blogger.com/atom/ns#" term="Edit Embedded Objects using Word VBA" /><title>How to Read Excel Sheet embedded in Word Document using VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red;"&gt;How to edit Embedded Objects (Excel Workbook) using Word VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
In our previous posts we have seen how to &lt;a href="http://vbadud.blogspot.com/2008/07/embed-existing-word-file-to-spreadsheet.html"&gt;Embedd an Word Document in Excel Object&lt;/a&gt; . Now let us try to read Excel spreadsheet embedded in Word document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_s2jU7girbyM/TFzQZr_oakI/AAAAAAAACuY/CcROlU87Mco/s1600/Edit_Embedded_Excel.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" bx="true" src="http://1.bp.blogspot.com/_s2jU7girbyM/TFzQZr_oakI/AAAAAAAACuY/CcROlU87Mco/s320/Edit_Embedded_Excel.PNG" /&gt;Excel Object Libarary Reference&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You need to add a reference to the Excel Object Libary as shown above from Tools --&amp;gt; References from Visual Basic Editor (VBE)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_s2jU7girbyM/TI2XliFpSkI/AAAAAAAACxo/0BzALB2Q_2w/s1600/Tools+References+VBA.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="115" ox="true" src="http://3.bp.blogspot.com/_s2jU7girbyM/TI2XliFpSkI/AAAAAAAACxo/0BzALB2Q_2w/s640/Tools+References+VBA.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The code loops through the available InlineShapes and activates them if they are Excel Spreadsheet. Then it is assigned to an Excel workbook object, which can be programatically handled.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Edit_Embedded_Excel_Objects()

Dim oWB As Excel.Workbook
Dim oIShape As InlineShape


For Each oIShape In ActiveDocument.InlineShapes
    If InStr(1, oIShape.OLEFormat.ProgID, "Excel") Then
        oIShape.OLEFormat.Activate
        Set oWB = oIShape.OLEFormat.Object
        oWB.Sheets(1).Range("A1").Value = "ProdID"
    End If
Next oIShape

End Sub

&lt;/pre&gt;&lt;br /&gt;
The code edits the value of the cell as shown below:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_s2jU7girbyM/TFzRIp5OnbI/AAAAAAAACug/sVSOT_pPKPM/s1600/Edit_Embedded_Excel_2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" bx="true" src="http://3.bp.blogspot.com/_s2jU7girbyM/TFzRIp5OnbI/AAAAAAAACug/sVSOT_pPKPM/s320/Edit_Embedded_Excel_2.PNG" /&gt;Edited Embedded Object using VBA&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
See how &lt;a href="http://vbadud.blogspot.com/search?q=Embedded"&gt;other Embedded objects are programmed&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-7404827927108873319?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wQYunDeUTejQIZ94l_aO5DbxAys/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wQYunDeUTejQIZ94l_aO5DbxAys/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wQYunDeUTejQIZ94l_aO5DbxAys/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wQYunDeUTejQIZ94l_aO5DbxAys/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/9JqGYXtsGqI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/7404827927108873319/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/08/how-to-read-excel-sheet-embedded-in.html#comment-form" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/7404827927108873319?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/7404827927108873319?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/9JqGYXtsGqI/how-to-read-excel-sheet-embedded-in.html" title="How to Read Excel Sheet embedded in Word Document using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_s2jU7girbyM/TFzQZr_oakI/AAAAAAAACuY/CcROlU87Mco/s72-c/Edit_Embedded_Excel.PNG" height="72" width="72" /><thr:total>7</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/08/how-to-read-excel-sheet-embedded-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEBRH09cSp7ImA9Wx5SEEQ.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-2537676462951927742</id><published>2010-08-06T03:30:00.000-07:00</published><updated>2010-08-06T03:30:55.369-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-06T03:30:55.369-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programmatically Identify cells containing Formula" /><category scheme="http://www.blogger.com/atom/ns#" term="Extract Formula using VBA" /><title>How to Extract All Formula's in Excel Sheet using VBA</title><content type="html">Highlight all cells containing Formulas using Excel VBA&lt;br /&gt;
&lt;br /&gt;
The following snippet highlights all cells that contain formula&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub HighLight_Formula_Cells()

Dim oWS As Worksheet
Dim oCell As Range

Set oWS = ActiveSheet

For Each oCell In oWS.Cells.SpecialCells(xlCellTypeFormulas)
    oCell.Interior.ColorIndex = 36
    MsgBox oCell.Formula
Next oCell


End Sub

&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-2537676462951927742?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GkkUa9GTS43FuwAlEhdfGN3HKm8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GkkUa9GTS43FuwAlEhdfGN3HKm8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GkkUa9GTS43FuwAlEhdfGN3HKm8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GkkUa9GTS43FuwAlEhdfGN3HKm8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/d5hfT0aWZas" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/2537676462951927742/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/08/how-to-extract-all-formulas-in-excel.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2537676462951927742?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2537676462951927742?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/d5hfT0aWZas/how-to-extract-all-formulas-in-excel.html" title="How to Extract All Formula's in Excel Sheet using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/08/how-to-extract-all-formulas-in-excel.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UFQng8eSp7ImA9Wx5TGUo.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-1544665185056310689</id><published>2010-08-04T19:26:00.000-07:00</published><updated>2010-08-04T19:26:53.671-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-04T19:26:53.671-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Excel Database ADO" /><category scheme="http://www.blogger.com/atom/ns#" term="External table is not in the expected format - Excel ADO VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Could not find installable ISAM" /><title>How to Connect XLSX file (Excel Workbook) through ADO</title><content type="html">&lt;strong&gt;Using Excel (Xlsx) file as a database using VBA (ActiveX Data Objects - ADO)&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
In the past we have already seen how to &lt;a href="http://vbadud.blogspot.com/2008/05/using-excel-as-database.html"&gt;Connect to an Excel file using ADO&lt;/a&gt; and query its contents. That was using Microsoft Excel 2003 or earlier. With Office 2007 the file formats haver changed to XLSX, which might create the following problems&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_s2jU7girbyM/TFogvRW1tfI/AAAAAAAACtY/d_9OAy7_AOw/s1600/ADO_EXcel_2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" bx="true" src="http://3.bp.blogspot.com/_s2jU7girbyM/TFogvRW1tfI/AAAAAAAACtY/d_9OAy7_AOw/s320/ADO_EXcel_2.PNG" /&gt;External table is not in the expected format - Excel ADO VBA&lt;br /&gt;
&lt;br /&gt;
or&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_s2jU7girbyM/TFogwI1TE8I/AAAAAAAACtg/dlVY_hk6-C8/s1600/ADO_EXcel.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" bx="true" src="http://4.bp.blogspot.com/_s2jU7girbyM/TFogwI1TE8I/AAAAAAAACtg/dlVY_hk6-C8/s320/ADO_EXcel.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;a href="http://4.bp.blogspot.com/_s2jU7girbyM/TFogwI1TE8I/AAAAAAAACtg/dlVY_hk6-C8/s1600/ADO_EXcel.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;Could not find installable ISAM.&lt;br /&gt;
Excel ADO VBA&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
to solve that use the following Connection string:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cN.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\comp\documents\visual studio 2010\Projects\ExcelWorkbookDocLevel\ExcelWorkbookDocLevel\ExcelWorkbook1.xlsx;Extended Properties=Excel 12.0;Persist Security Info=False"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-1544665185056310689?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7JUPk87A79h02ipSDVGkHM5diaw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7JUPk87A79h02ipSDVGkHM5diaw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7JUPk87A79h02ipSDVGkHM5diaw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7JUPk87A79h02ipSDVGkHM5diaw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/xXOXJSPrIWc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/1544665185056310689/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/08/how-to-connect-xlsx-file-excel-workbook.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/1544665185056310689?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/1544665185056310689?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/xXOXJSPrIWc/how-to-connect-xlsx-file-excel-workbook.html" title="How to Connect XLSX file (Excel Workbook) through ADO" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_s2jU7girbyM/TFogvRW1tfI/AAAAAAAACtY/d_9OAy7_AOw/s72-c/ADO_EXcel_2.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/08/how-to-connect-xlsx-file-excel-workbook.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08GRngyfyp7ImA9Wx5TEkU.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-2512922001795159425</id><published>2010-07-27T19:57:00.000-07:00</published><updated>2010-07-27T19:57:07.697-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-27T19:57:07.697-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="AutoFilter using Excel VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Applying Multiple Criteria in AutoFilter" /><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Autofilter- Only Last Value of the Array" /><category scheme="http://www.blogger.com/atom/ns#" term="Arrays in AutoFilter Excel VBA" /><title>Excel VBA Autofilter - Specify Multiple Criteria using Array</title><content type="html">&lt;strong&gt;&lt;span style="color: red; font-size: large;"&gt;How to pass an Array as Criteria in Excel Autofilter - VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
After long time let us revisit our good old &lt;a href="http://vbadud.blogspot.com/2008/08/autofilter-using-excel-vba.html"&gt;Autofilter Fruits example&lt;/a&gt;. The following figure shows the data available&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_s2jU7girbyM/TE-bLKFlrFI/AAAAAAAACsw/nRXJOxxUuTY/s1600/DND_Filter_Original.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hw="true" src="http://3.bp.blogspot.com/_s2jU7girbyM/TE-bLKFlrFI/AAAAAAAACsw/nRXJOxxUuTY/s320/DND_Filter_Original.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
If you need to filter say Oranges and Apples alone, you can either pass both criteria (Yes! I have avoided using - Mutliple criteria) or can try using an Array where you can pass multiple values&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
Sub AutoFilter_Using_Arrays()&lt;br /&gt;
&lt;br /&gt;
Dim oWS As Worksheet&lt;br /&gt;
&lt;br /&gt;
On Error GoTo Err_Filter&lt;br /&gt;
&lt;br /&gt;
Dim arCriteria(0 To 1) As String&lt;br /&gt;
&lt;br /&gt;
Set oWS = ActiveSheet&lt;br /&gt;
&lt;br /&gt;
arCriteria(0) = "Apple"&lt;br /&gt;
arCriteria(1) = "Orange"&lt;br /&gt;
&lt;br /&gt;
oWS.UsedRange.AutoFilter Field:=2, Criteria1:=arCriteria, Operator:=xlFilterValues&lt;br /&gt;
&lt;br /&gt;
Finally:&lt;br /&gt;
&lt;br /&gt;
If Not oWS Is Nothing Then Set oWS = Nothing&lt;br /&gt;
&lt;br /&gt;
Err_Filter:&lt;br /&gt;
If Err &amp;lt;&amp;gt; 0 Then&lt;br /&gt;
MsgBox Err.Description&lt;br /&gt;
Err.Clear&lt;br /&gt;
GoTo Finally&lt;br /&gt;
End If&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
If you leave out the Operator in &lt;span style="color: red;"&gt;Excel VBA Autofilter- Only Last Value of the Array Will be displayed &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can also pass the values directly like:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
oWS.UsedRange.AutoFilter Field:=2, Criteria1:=Array("Apples","Peaches","Grapes), Operator:=xlFilterValues&lt;br /&gt;
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-2512922001795159425?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8vCXHvcQJVxoQwBu7WxMzbCmFpU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8vCXHvcQJVxoQwBu7WxMzbCmFpU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8vCXHvcQJVxoQwBu7WxMzbCmFpU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8vCXHvcQJVxoQwBu7WxMzbCmFpU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/yOJNvMCpmC0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/2512922001795159425/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/07/excel-vba-autofilter-specify-multiple.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2512922001795159425?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2512922001795159425?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/yOJNvMCpmC0/excel-vba-autofilter-specify-multiple.html" title="Excel VBA Autofilter - Specify Multiple Criteria using Array" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_s2jU7girbyM/TE-bLKFlrFI/AAAAAAAACsw/nRXJOxxUuTY/s72-c/DND_Filter_Original.JPG" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/07/excel-vba-autofilter-specify-multiple.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcMRng-cCp7ImA9Wx5TEEk.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-3322127109557847381</id><published>2010-07-25T01:21:00.000-07:00</published><updated>2010-07-25T01:21:27.658-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-25T01:21:27.658-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="EXcel VBA Sheet Protection" /><category scheme="http://www.blogger.com/atom/ns#" term="Highlight Editable ranges using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="AllowEditRanges Excel VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Macro to extract editable ranges" /><title>Program/Macro to Highlight Editable Ranges in Protected Sheet</title><content type="html">&lt;div style="color: red;"&gt;&lt;b&gt;How to identify Editable ranges in a protected Excel sheet using VBA&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
My good friend Srikanth Srinivasan is a Project Manager whom Microsoft will definitely want to hire as evangelist. He uses the functionality of Excel to great extent and made it ubiquitous.&lt;br /&gt;
&lt;br /&gt;
The following code was for him, which highlights the ranges that are not protected in Excel sheet&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
Sub HighLight_Editable_Ranges()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Dim oWS As Worksheet&lt;br /&gt;
    Dim oRng As AllowEditRange&lt;br /&gt;
    &lt;br /&gt;
    Set oWS = ActiveSheet&lt;br /&gt;
    &lt;br /&gt;
    oWS.Unprotect&lt;br /&gt;
    &lt;br /&gt;
    For Each oRng In oWS.Protection.AllowEditRanges&lt;br /&gt;
        oRng.Range.Interior.ColorIndex = 35&lt;br /&gt;
    Next oRng&lt;br /&gt;
    &lt;br /&gt;
    oWS.Protect&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-3322127109557847381?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9peHKtrNIzODvk7z0YYZINIOCHI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9peHKtrNIzODvk7z0YYZINIOCHI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9peHKtrNIzODvk7z0YYZINIOCHI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9peHKtrNIzODvk7z0YYZINIOCHI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/NGDr1T7vkwQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/3322127109557847381/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/07/programmacro-to-highlight-editable.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3322127109557847381?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3322127109557847381?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/NGDr1T7vkwQ/programmacro-to-highlight-editable.html" title="Program/Macro to Highlight Editable Ranges in Protected Sheet" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/07/programmacro-to-highlight-editable.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMNRHYzfSp7ImA9WxFaGEs.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-8440837113321197110</id><published>2010-07-23T00:01:00.000-07:00</published><updated>2010-07-23T00:01:35.885-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-23T00:01:35.885-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Validate User Value for Comboboxes in Word VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Content Controls in VBA" /><title>How to retrieve value from Content Controls using Word VBA</title><content type="html">The following snippet validates the user selection using VBA. This code uses the content control created in previous example - (&lt;a href="http://vbadud.blogspot.com/2010/07/how-to-add-content-controls-using-vba.html"&gt;How to add Content Controls using VBA)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Validate_ContentControl()

Dim oCC As ContentControl
Dim OCCEntry As ContentControlListEntry

Set oCC = ActiveDocument.ContentControls(1)

For i = 1 To oCC.DropdownListEntries.Count
     If oCC.DropdownListEntries.Item(i).Text = oCC.Range.Text Then
        Set OCCEntry = oCC.DropdownListEntries.Item(i)
        ' Check the text against value - can be checked directly with text
        If OCCEntry.Value = 1 Then
            MsgBox "Correct"
        Else
            MsgBox "Try Again"
            Exit Sub
        End If
     End If
    
Next i
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-8440837113321197110?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/q4498ghX1dvm8HHgDIXQou8IEUU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/q4498ghX1dvm8HHgDIXQou8IEUU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/q4498ghX1dvm8HHgDIXQou8IEUU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/q4498ghX1dvm8HHgDIXQou8IEUU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/CuUXiCVr52A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/8440837113321197110/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/07/how-to-retrieve-value-from-content.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8440837113321197110?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8440837113321197110?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/CuUXiCVr52A/how-to-retrieve-value-from-content.html" title="How to retrieve value from Content Controls using Word VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/07/how-to-retrieve-value-from-content.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8GRnoycCp7ImA9WxFaGEs.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-4728159497759885534</id><published>2010-07-22T23:50:00.000-07:00</published><updated>2010-07-22T23:50:27.498-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-22T23:50:27.498-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="How to prevent Content controls being deleted" /><category scheme="http://www.blogger.com/atom/ns#" term="Add Combo Box using Word VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Add Content Controls using VBA" /><title>How to add Content Controls using VBA</title><content type="html">&lt;div style="color: red;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Add Combobox to Word document using VBA&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
The following code would add a Combo Box control to the existing Word document:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Add_A_ContentControl()

Dim oCC As ContentControl

Set oCC = ActiveDocument.ContentControls.Add(wdContentControlComboBox, Selection.Range)
oCC.SetPlaceholderText , , "Which Team Won the World Cup 2010"

oCC.Title = "World Cup Teams"
oCC.DropdownListEntries.Add "Spain", 1
oCC.DropdownListEntries.Add "Netherlands", 0
oCC.DropdownListEntries.Add "France", 2
oCC.DropdownListEntries.Add "Uruguay", 3

' Prevents the Control from being deleted
oCC.LockContentControl = True
End Sub

&lt;/pre&gt;&lt;br /&gt;
Lock the control by setting the LockContentControl attribute to prevent it getting accidentally deleted.&lt;br /&gt;
&lt;br /&gt;
The content control gets added as shown below&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_s2jU7girbyM/TEk7OzWgP6I/AAAAAAAACso/Ua3DqKw5FbM/s1600/ContentControl+VBA.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/_s2jU7girbyM/TEk7OzWgP6I/AAAAAAAACso/Ua3DqKw5FbM/s640/ContentControl+VBA.png" width="640" /&gt;Combobox Content Control in Word VBA&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-4728159497759885534?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/St2KvBxIuMs5H-joaqbhpgUMTgg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/St2KvBxIuMs5H-joaqbhpgUMTgg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/St2KvBxIuMs5H-joaqbhpgUMTgg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/St2KvBxIuMs5H-joaqbhpgUMTgg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/693pGckAiZI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/4728159497759885534/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/07/how-to-add-content-controls-using-vba.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4728159497759885534?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4728159497759885534?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/693pGckAiZI/how-to-add-content-controls-using-vba.html" title="How to add Content Controls using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_s2jU7girbyM/TEk7OzWgP6I/AAAAAAAACso/Ua3DqKw5FbM/s72-c/ContentControl+VBA.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/07/how-to-add-content-controls-using-vba.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUHRn0yfSp7ImA9WxFbE0U.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-8485427600578704689</id><published>2010-07-05T20:17:00.000-07:00</published><updated>2010-07-05T20:17:17.395-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-05T20:17:17.395-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VBA Get Active Internet Explorer" /><category scheme="http://www.blogger.com/atom/ns#" term="Getobject Internet Explorer in VBA" /><title>GetObject Error with Internet Explorer</title><content type="html">How to get active Internet Explorer Object using Getobject in VBA&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Set IEBrowser = GetObject(, "InternetExplorer.Application")
&lt;/pre&gt;&lt;br /&gt;
Using GetObject for Internet Explorer in VBA throws Runtime error 429 - ActiveX can't create object. The&amp;nbsp; solution for this is to use ShellWindows &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_s2jU7girbyM/TDKdoFRPUXI/AAAAAAAACpo/pCRBd3RqxFQ/s1600/Internet_Explorer_ActiveX_Error_GetObject.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="220" src="http://4.bp.blogspot.com/_s2jU7girbyM/TDKdoFRPUXI/AAAAAAAACpo/pCRBd3RqxFQ/s400/Internet_Explorer_ActiveX_Error_GetObject.PNG" width="400" /&gt;Runtime error 429 - ActiveX can't create object - GetObject for Internet Explorer&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Public Function IENavigate(ByRef IEBrowser) As Boolean

Dim theSHD As SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer
Dim i As Long
Dim bIEFound As Boolean

On Error GoTo Err_IE
    
    Set theSHD = New SHDocVw.ShellWindows
    For i = 0 To theSHD.Count - 1
        Set IE = theSHD.Item(i)
        If Not IE Is Nothing Then
            If InStr(1, IE.LocationURL, "file://", vbTextCompare) = 0 And Len(IE.LocationURL) &amp;lt;&amp;gt; 0 Then
                If IE.Visible = True Then bIEFound = True: Exit For
                
            End If
        End If
    Next

    If bIEFound = True Then
        Set IEBrowser = IE
        IENavigate = True
    Else
        IENavigate = False
    End If
      
' -------------------------------------
' Error Handling
' -------------------------------------
Err_IE:
    If Err &amp;lt;&amp;gt; 0 Then
        Err.Clear
        Resume Next
    End If
End Function

&lt;/pre&gt;&lt;br /&gt;
The above code uses Microsoft Internet controls reference:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_s2jU7girbyM/TDKe4_oEzHI/AAAAAAAACpw/kuDtNvNoBuw/s1600/Microsoft_Internet_Controls_Reference.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_s2jU7girbyM/TDKe4_oEzHI/AAAAAAAACpw/kuDtNvNoBuw/s320/Microsoft_Internet_Controls_Reference.PNG" /&gt;Microsoft Internet controls reference&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
without which the following error might occur&lt;br /&gt;
&lt;br /&gt;
---------------------------&lt;br /&gt;
Microsoft Visual Basic for Applications&lt;br /&gt;
---------------------------&lt;br /&gt;
Compile error:&lt;br /&gt;
&lt;br /&gt;
User-defined type not defined&lt;br /&gt;
---------------------------&lt;br /&gt;
OK   Help   &lt;br /&gt;
---------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_s2jU7girbyM/TDKfTfiYx5I/AAAAAAAACp4/rHyL3kpq82Q/s1600/Usertype_NotDefined_VBA.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="130" src="http://2.bp.blogspot.com/_s2jU7girbyM/TDKfTfiYx5I/AAAAAAAACp4/rHyL3kpq82Q/s200/Usertype_NotDefined_VBA.PNG" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Once you get the Internet Explorer object, you can use it as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
Sub GEt_IE()&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Dim IEBrowser As InternetExplorer&lt;br /&gt;
&amp;nbsp; IENavigate IEBrowser&lt;br /&gt;
&amp;nbsp; If Not IEBrowser Is Nothing Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox IEBrowser.Document.Title&lt;br /&gt;
&amp;nbsp; End If&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-8485427600578704689?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TLH1ZFhR_ZwHz-UlcOs3YJr1XIg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TLH1ZFhR_ZwHz-UlcOs3YJr1XIg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TLH1ZFhR_ZwHz-UlcOs3YJr1XIg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TLH1ZFhR_ZwHz-UlcOs3YJr1XIg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/1uuOgJuJePU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/8485427600578704689/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/07/getobject-error-with-internet-explorer.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8485427600578704689?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8485427600578704689?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/1uuOgJuJePU/getobject-error-with-internet-explorer.html" title="GetObject Error with Internet Explorer" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_s2jU7girbyM/TDKdoFRPUXI/AAAAAAAACpo/pCRBd3RqxFQ/s72-c/Internet_Explorer_ActiveX_Error_GetObject.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/07/getobject-error-with-internet-explorer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MHQng5eyp7ImA9WxFbEU8.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-5276812354345833199</id><published>2010-07-02T19:50:00.000-07:00</published><updated>2010-07-02T19:50:33.623-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-02T19:50:33.623-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Get File Name using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Extract File Names using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="InStrRev Function in VBA" /><title>How to extract file name from FullPath string using VBA</title><content type="html">Extract Name of the File from Path / Fullname using VBA&lt;br /&gt;
&lt;br /&gt;
There are many methods to extract the filename from a given string. You can use &lt;a href="http://vbadud.blogspot.com/search?q=FileSystemObject"&gt;FileSystemObject&lt;/a&gt;'s function GetFileName or can use &lt;a href="http://vbadud.blogspot.com/search?q=Array"&gt;Arrays &lt;/a&gt;to get the last element of the array split by path separator&lt;br /&gt;
&lt;br /&gt;
Here we use even simpler functions like &lt;a href="http://vbadud.blogspot.com/search?q=Dir"&gt;Dir &lt;/a&gt;and &lt;a href="http://vbadud.blogspot.com/search?q=Instr"&gt;InStrRev &lt;/a&gt;to achieve the same&lt;br /&gt;
&lt;br /&gt;
Dir function will retrieve the name only if the file exists:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
strFilePath = "C:\Users\comp\Documents\sample.xlsx"&lt;br /&gt;
&lt;br /&gt;
sFileName = Dir(strFilePath)&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
If the file doesn't exist, Dir function will return an empty string. The following would be a better option&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
strFilePath = "C:\Users\comp\Documents\sample.xlsx"&lt;br /&gt;
&lt;br /&gt;
sFileName = Mid(strFilePath, InStrRev(strFilePath, "\") + 1, Len(strFilePath))&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Try it out and post the options you use&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-5276812354345833199?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/k9sAQoVQlPZZ1p9nP1xUQ8ILmn8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/k9sAQoVQlPZZ1p9nP1xUQ8ILmn8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/k9sAQoVQlPZZ1p9nP1xUQ8ILmn8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/k9sAQoVQlPZZ1p9nP1xUQ8ILmn8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/HCcXQVN5kbY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/5276812354345833199/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/07/how-to-extract-file-name-from-fullpath.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/5276812354345833199?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/5276812354345833199?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/HCcXQVN5kbY/how-to-extract-file-name-from-fullpath.html" title="How to extract file name from FullPath string using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/07/how-to-extract-file-name-from-fullpath.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4CR3k9eip7ImA9WxFUFE4.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-3429075947740247566</id><published>2010-06-24T20:36:00.000-07:00</published><updated>2010-06-24T20:36:06.762-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-24T20:36:06.762-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Add Shapes to Headers using Word VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="simulate speech Echo in VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="asynchronous Speak" /><title>How to simulate speech Echo in VBA</title><content type="html">The following snippet simulates ( a sort of ) the Echo effect in VBA. This uses &lt;a href="http://vbadud.blogspot.com/2010/06/vba-how-to-convert-text-file-to-speech.html"&gt;Microsoft Speech Object Library&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
Sub Voice_It_Out()&lt;br /&gt;
&lt;br /&gt;
Dim oVoice As SpVoice&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Voice Object&lt;br /&gt;
&lt;br /&gt;
' --------------------------------------------------------------&lt;br /&gt;
' Code for http://vbadud.blogspot.com&lt;br /&gt;
' --------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Set oVoice = New SpVoice&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For iVol = 100 To 10 Step -10&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oVoice.Volume = iVol&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oVoice.Speak "Echo!"&lt;br /&gt;
Next iVol&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-3429075947740247566?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3bShm4NPEPZ74YoMXbLxFVRlCyU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3bShm4NPEPZ74YoMXbLxFVRlCyU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3bShm4NPEPZ74YoMXbLxFVRlCyU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3bShm4NPEPZ74YoMXbLxFVRlCyU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/EZwgnG52ns4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/3429075947740247566/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/06/how-to-simulate-speech-echo-in-vba.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3429075947740247566?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3429075947740247566?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/EZwgnG52ns4/how-to-simulate-speech-echo-in-vba.html" title="How to simulate speech Echo in VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/06/how-to-simulate-speech-echo-in-vba.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8ERnozfSp7ImA9WxFUFE4.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-7273219555396857881</id><published>2010-06-24T20:33:00.000-07:00</published><updated>2010-06-24T20:33:27.485-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-24T20:33:27.485-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="How to stream a text file to speaker using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="VBA Speaker output" /><category scheme="http://www.blogger.com/atom/ns#" term="Speech to Text using VBA" /><title>VBA : How to convert text file to speech (audio) using VBA</title><content type="html">Text to Speech using Excel VBA : Audio/Speech from input file&lt;br /&gt;
&lt;br /&gt;
If you want to spell out the content of text file using VBA you can do it as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Speech_FromFile_Example()

Dim oVoice As SpVoice                               ' Voice Object
Dim oVoiceFile As SpFileStream                      ' File Stream Object
Dim sFile As String                                 ' File Name

Set oVoice = New SpVoice
Set oVoiceFile = New SpFileStream

' --------------------------------------------------------------
' Code for http://vbadud.blogspot.com
' --------------------------------------------------------------

oVoice.Speak "This is an example for reading out a file"

sFile = "C:\ShasurData\ForBlogger\SpeechSample.txt"

oVoiceFile.Open sFile

oVoice.SpeakStream oVoiceFile

End Sub
&lt;/pre&gt;&lt;br /&gt;
The above code creates a filestream and reads the text file and the Voice object speaks it out! &lt;br /&gt;
&lt;br /&gt;
The code requires Microsoft Speech Object Library (see figure below)&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_s2jU7girbyM/TCQiEyDatrI/AAAAAAAACpU/8ut1UC-QotI/s1600/VBA+Speech+Object+Libary.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="321" src="http://4.bp.blogspot.com/_s2jU7girbyM/TCQiEyDatrI/AAAAAAAACpU/8ut1UC-QotI/s400/VBA+Speech+Object+Libary.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
See also:&lt;br /&gt;
&lt;h3 class="post-title entry-title"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://vbadud.blogspot.com/2008/03/voice-messages-in-vba.html"&gt;Voice Messages in VBA&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-7273219555396857881?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Mbe7PnMWNZKTQ4FSwvD6LZ59BQg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Mbe7PnMWNZKTQ4FSwvD6LZ59BQg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Mbe7PnMWNZKTQ4FSwvD6LZ59BQg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Mbe7PnMWNZKTQ4FSwvD6LZ59BQg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/sZLl21VQIz8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/7273219555396857881/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/06/vba-how-to-convert-text-file-to-speech.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/7273219555396857881?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/7273219555396857881?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/sZLl21VQIz8/vba-how-to-convert-text-file-to-speech.html" title="VBA : How to convert text file to speech (audio) using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_s2jU7girbyM/TCQiEyDatrI/AAAAAAAACpU/8ut1UC-QotI/s72-c/VBA+Speech+Object+Libary.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/06/vba-how-to-convert-text-file-to-speech.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUHSH8_eCp7ImA9WxFUFE4.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-1826327998728921543</id><published>2010-06-24T20:23:00.000-07:00</published><updated>2010-06-24T20:23:59.140-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-24T20:23:59.140-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Get Author Names" /><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA get Track Revision Details" /><category scheme="http://www.blogger.com/atom/ns#" term="Track Revisions using VBA" /><title>How to get Author details from Track Changes using VBA</title><content type="html">&lt;div style="color: orange;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Word VBA - extract Revision Author information&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
If you want to know the details of track revisions, for example, Author name etc the following code will help you:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Get_TrackRevision_Author()

Dim oRev As Revision
Dim oRange As Range

' -----------------------------------------------------------
' Change the line below to suit your needs
' -----------------------------------------------------------
Set oRange = Selection.Range

' -----------------------------------------------------------
' Coded by Shasur for http://vbadud.blogspot.com
' -----------------------------------------------------------

For Each oRev In oRange.Revisions
    MsgBox oRev.Range.Text &amp;amp; " " &amp;amp; oRev.Author
Next oRev


End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The following code provides you more information (like if the comment is inserted / deleted)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;If oRev.Type = wdRevisionDelete Then
        MsgBox oRev.Range.Text &amp;amp; " deleted by " &amp;amp; oRev.Author
    ElseIf oRev.Type = wdRevisionInsert Then
        MsgBox oRev.Range.Text &amp;amp; " added by " &amp;amp; oRev.Author
    Else
        MsgBox oRev.Range.Text &amp;amp; " " &amp;amp; oRev.Author
    End If
&lt;/pre&gt;&lt;br /&gt;
If you want to know &lt;b&gt;Date of Revision using VBA &lt;/b&gt;then the following can be added&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;MsgBox oRev.Range.Text &amp;amp; " " &amp;amp; oRev.Author &amp;amp; " " &amp;amp; oRev.Date
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-1826327998728921543?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8-72XJJqq2CZenJh3StIJgSP1dE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8-72XJJqq2CZenJh3StIJgSP1dE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8-72XJJqq2CZenJh3StIJgSP1dE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8-72XJJqq2CZenJh3StIJgSP1dE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/qjTPTpTE0W4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/1826327998728921543/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/06/how-to-get-author-details-from-track.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/1826327998728921543?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/1826327998728921543?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/qjTPTpTE0W4/how-to-get-author-details-from-track.html" title="How to get Author details from Track Changes using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/06/how-to-get-author-details-from-track.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcDRnkzeip7ImA9WxFVFEU.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-3477074934803927899</id><published>2010-06-13T19:37:00.000-07:00</published><updated>2010-06-13T19:37:57.782-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-13T19:37:57.782-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Save Excel Selection as Image using VBA. How to export Excel Range as Image" /><category scheme="http://www.blogger.com/atom/ns#" term="Excel Range to JPG using VBa" /><title>How to Save Excel Range as Image using VBA</title><content type="html">&lt;div style="color: red;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;How to copy Excel Range as Image using VBA / How to export Excel Range as Imag&lt;/b&gt;e&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
The following code saves the Excel Range (A1:B2) as an image.&lt;br /&gt;
&lt;br /&gt;
It uses the Export function of the Chart object (Refer :&lt;a href="http://vbadud.blogspot.com/2009/03/how-to-save-chart-as-image-using-excel.html"&gt;How to Save a Chart as Image using Excel VBA&lt;/a&gt;)&lt;br /&gt;
to save as Image&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Export_Range_Images()

' =========================================
' Code to save selected Excel Range as Image
' =========================================

Dim oRange As Range
Dim oCht As Chart
Dim oImg As Picture



Set oRange = Range("A1:B2")
Set oCht = Charts.Add


oRange.CopyPicture xlScreen, xlPicture


oCht.Paste

oCht.Export FileName:="C:\temp\SavedRange.jpg", Filtername:="JPG"

End Sub

&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-3477074934803927899?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NowmsyM2PfQekT89p02tv09IEq8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NowmsyM2PfQekT89p02tv09IEq8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NowmsyM2PfQekT89p02tv09IEq8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NowmsyM2PfQekT89p02tv09IEq8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/reqzUKSi9mI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/3477074934803927899/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/06/how-to-save-excel-range-as-image-using.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3477074934803927899?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3477074934803927899?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/reqzUKSi9mI/how-to-save-excel-range-as-image-using.html" title="How to Save Excel Range as Image using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/06/how-to-save-excel-range-as-image-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MAQHY-eyp7ImA9WxFWEEw.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-1982690922764718751</id><published>2010-05-27T19:57:00.000-07:00</published><updated>2010-05-27T19:57:21.853-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-27T19:57:21.853-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Compress Pictures/Images in Excel using VBA" /><title>How to Compress Pictures in Excel using VBA</title><content type="html">&lt;div style="color: red;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;How to Programatically Compress Pictures/Images in Excel using VBA&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
If you are trying to compress pictures, you will normally be doing using the following dialog:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_s2jU7girbyM/S_8uzYA61xI/AAAAAAAACkY/pRK0vg2rGQ8/s1600/Excel+VBA+Compress+Pictures.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_s2jU7girbyM/S_8uzYA61xI/AAAAAAAACkY/pRK0vg2rGQ8/s320/Excel+VBA+Compress+Pictures.PNG" /&gt;Compress Pictures Excel Dialog&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_s2jU7girbyM/S_8uykrPY3I/AAAAAAAACkQ/1xRmpcTpR_Q/s1600/Excel+VBA+Compress+Pictures2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_s2jU7girbyM/S_8uykrPY3I/AAAAAAAACkQ/1xRmpcTpR_Q/s320/Excel+VBA+Compress+Pictures2.PNG" /&gt;Compress Pictures Excel Dialog&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same dialog can be automated using Excel VBA and SendKeys as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Compress_PIX()

Dim octl As CommandBarControl

With Selection
    Set octl = Application.CommandBars.FindControl(ID:=6382)
    Application.SendKeys "%e~"
    Application.SendKeys "%a~"
     octl.Execute
End With

End Sub&amp;nbsp;&lt;/pre&gt;&lt;pre class="vb" name="code"&gt;&lt;/pre&gt;&lt;br /&gt;
Supressing "Compressing Pictures May reduce the quality of your images.." dialog is also taken care by SendKeys&lt;br /&gt;
&lt;br /&gt;
The code uses &lt;a href="http://vbadud.blogspot.com/search?q=CommandBarControl+"&gt;CommandBarControl &lt;/a&gt;to find the Command and then execute the dialog&lt;br /&gt;
&lt;br /&gt;
&lt;h3 class="post-title entry-title"&gt;&lt;a href="http://vbadud.blogspot.com/2010/05/how-to-increase-decrease-size-of-images.html"&gt;See also: How to Increase / Decrease Size of Images in Word Document using VBA&lt;/a&gt;&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-1982690922764718751?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/P3BHHMPuhfJUbsYumdo_VW-IFJ8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/P3BHHMPuhfJUbsYumdo_VW-IFJ8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/P3BHHMPuhfJUbsYumdo_VW-IFJ8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/P3BHHMPuhfJUbsYumdo_VW-IFJ8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/HCYwirDrJcc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/1982690922764718751/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/05/how-to-compress-pictures-in-excel-using.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/1982690922764718751?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/1982690922764718751?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/HCYwirDrJcc/how-to-compress-pictures-in-excel-using.html" title="How to Compress Pictures in Excel using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_s2jU7girbyM/S_8uzYA61xI/AAAAAAAACkY/pRK0vg2rGQ8/s72-c/Excel+VBA+Compress+Pictures.PNG" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/05/how-to-compress-pictures-in-excel-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEFRnY6cCp7ImA9WxFWEEw.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-2148242648040963279</id><published>2010-05-27T19:43:00.000-07:00</published><updated>2010-05-27T19:43:37.818-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-27T19:43:37.818-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Userdefined Function in Excel VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Add Argument Descriptions to Excel UDFs" /><category scheme="http://www.blogger.com/atom/ns#" term="Categorize Excel UDFs" /><title>How to add description to Macro Functions in Excel VBA</title><content type="html">How to add argument description to Macros/User Defined Functions in Excel VBA&lt;br /&gt;
&lt;br /&gt;
User-defined functions are created in Excel for helping the Excel users. It would be good to add descriptions of the arguments used in the functions. This can be done using Application.Macrooptions method&lt;br /&gt;
&lt;br /&gt;
Let us assume a small User Defined Function that takes an argument:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Function A_Sample_UDF(ByVal sArg)

MsgBox "Sample UDF " &amp;amp; sArg

End Function

&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The following code will add the UDF to information category&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Add_UDF()

Dim ArgDes As Variant

ArgDes = Array("First Arg")

Application.MacroOptions Macro:="Personal.XLSB!A_Sample_UDF", Description:="Sample Function", Category:="Information", ArgumentDescriptions:=ArgDes

End Sub
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-2148242648040963279?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lo0dqa8kTA0p-KmWsM0iQ-tye7c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lo0dqa8kTA0p-KmWsM0iQ-tye7c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lo0dqa8kTA0p-KmWsM0iQ-tye7c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lo0dqa8kTA0p-KmWsM0iQ-tye7c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/VOZZ7_U6SBE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/2148242648040963279/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/05/how-to-add-description-to-macro.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2148242648040963279?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2148242648040963279?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/VOZZ7_U6SBE/how-to-add-description-to-macro.html" title="How to add description to Macro Functions in Excel VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/05/how-to-add-description-to-macro.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUMQXYyfyp7ImA9WxFWEEw.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-53002469274144759</id><published>2010-05-27T19:21:00.000-07:00</published><updated>2010-05-27T19:21:20.897-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-27T19:21:20.897-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Powerpoint VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Extract TextBoxes using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Retrieve TextBox Content from Powerpoint VBA" /><title>How to Extract TextBox Contents from All Slides using Powerpoint VBA</title><content type="html">&lt;div style="color: red;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Extract Text from Textboxes in Powerpoint slides using VBA&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
Dedicated to good blogger friend Rahul. This code snippet loops through the slides and extracts the contents of the Textboxes &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Extract_TextBox_Text_FromSlides()

Dim oPres As Presentation
Dim oSlide As Slide
Dim oShapes As Shapes
Dim oShape As Shape

Set oPres = ActivePresentation

' --------------------------------------------------
' coded by Shasur for http://vbadud.blogspot.com
' --------------------------------------------------

For Each oSlide In oPres.Slides
    Set oShapes = oSlide.Shapes
    For Each oShape In oShapes
        If oShape.Type = msoTextBox Then
        
            Debug.Print oSlide.Name &amp;amp; vbTab &amp;amp; oShape.TextFrame.TextRange.Text
            
        End If
    Next oShape
Next oSlide



End Sub

&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-53002469274144759?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Nl2SbpRVkGz369XEekigOfX3BjM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Nl2SbpRVkGz369XEekigOfX3BjM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Nl2SbpRVkGz369XEekigOfX3BjM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Nl2SbpRVkGz369XEekigOfX3BjM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/kTNK8Frgj6I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/53002469274144759/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/05/how-to-extract-textbox-contents-from.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/53002469274144759?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/53002469274144759?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/kTNK8Frgj6I/how-to-extract-textbox-contents-from.html" title="How to Extract TextBox Contents from All Slides using Powerpoint VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/05/how-to-extract-textbox-contents-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUEQ3g7cCp7ImA9WxFXGU8.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-8188733842651922781</id><published>2010-05-26T19:43:00.000-07:00</published><updated>2010-05-26T19:43:22.608-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-26T19:43:22.608-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="GetVersionEx  VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Get OS Version using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Minor and Major Operating System versions using VBA" /><title>How to get OS Version using VBA</title><content type="html">&lt;div style="color: red;"&gt;&lt;b&gt;How to retrieve Operating System Information using Excel/Word VBA&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
The version information of OS can be retrieved using the WIN API functions given below&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Private Type OSVERSIONINFO
    dwOSVersionInfoSize As Long
    dwMajorVersion As Long
    dwMinorVersion As Long
    dwBuildNumber As Long
    dwPlatformId As Long
    szCSDVersion As String * 128
End Type

Private Declare Function GetVersionEx Lib "kernel32" _
      Alias "GetVersionExA" (lpVersionInformation As _
      OSVERSIONINFO) As Long

&lt;/pre&gt;&lt;br /&gt;
The following sub uses GetVersionEx function to get the Major and Minor version of OS&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Get_OS_Version_VBA()

' -------------------------------------------------------------
' Code to Get Version of Operating System through VBA
' -------------------------------------------------------------

Dim oOSInfo As OSVERSIONINFO
oOSInfo.dwOSVersionInfoSize = Len(oOSInfo)


GetVersionEx oOSInfo

' -------------------------------------------------------------
' Coded for http://vbadud.blogspot.com
' -------------------------------------------------------------

MsgBox "Version of Current OS is " &amp;amp; oOSInfo.dwMajorVersion &amp;amp; "." &amp;amp; oOSInfo.dwMinorVersion

End Sub

&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-8188733842651922781?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-oD96MEXE-ZQ3qehzVWfxcn4fSA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-oD96MEXE-ZQ3qehzVWfxcn4fSA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-oD96MEXE-ZQ3qehzVWfxcn4fSA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-oD96MEXE-ZQ3qehzVWfxcn4fSA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/B9A8i9nxWTg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/8188733842651922781/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/05/how-to-get-os-version-using-vba.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8188733842651922781?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8188733842651922781?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/B9A8i9nxWTg/how-to-get-os-version-using-vba.html" title="How to get OS Version using VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/05/how-to-get-os-version-using-vba.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8NQn48cCp7ImA9WxFXFUQ.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-9196218531582930388</id><published>2010-05-22T23:41:00.000-07:00</published><updated>2010-05-22T23:41:33.078-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-22T23:41:33.078-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Get Sub Directories using  VBA FileSystemObject Function" /><category scheme="http://www.blogger.com/atom/ns#" term="get the list of directories or files using VBA Functions" /><category scheme="http://www.blogger.com/atom/ns#" term="VBA recursive deep directory search" /><title>How to iterate through all Subdirectories till the last directory in VBA</title><content type="html">&lt;strong&gt;List all Level SubDirectories using VBA&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The following code lists all the directories under c:\Temp&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Function GetSubDir(ByVal sDir)

    Dim oFS As New FileSystemObject
    Dim oDir
    
    Set oDir = oFS.GetFolder(sDir)
    For Each oSub In oDir.SubFolders
        MsgBox oSub.Path
        GetSubDir oSub.Path
    Next oSub
End Function

&lt;/pre&gt;&lt;br /&gt;
You can call the function like shown below&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;GetSubDir "C:\Temp\"

&lt;/pre&gt;&lt;br /&gt;
The code uses FileSystemObject from Microsoft Scripting RunTime. You need to add reference to this library (see figure below)&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_s2jU7girbyM/S_jNjT3UYsI/AAAAAAAACkI/_t-Xu_ob0P8/s1600/Filesystemobject+Reference+VBA.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" gu="true" height="321" src="http://4.bp.blogspot.com/_s2jU7girbyM/S_jNjT3UYsI/AAAAAAAACkI/_t-Xu_ob0P8/s400/Filesystemobject+Reference+VBA.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
See also &lt;a href="http://vbadud.blogspot.com/2007/05/vba-dir-function-to-get-sub-directories.html"&gt;VBA Dir Function to Get Sub Directories&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28492262-9196218531582930388?l=vbadud.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_2xwlZetO_rE4u43_Ck0-Y0xiXU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_2xwlZetO_rE4u43_Ck0-Y0xiXU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_2xwlZetO_rE4u43_Ck0-Y0xiXU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_2xwlZetO_rE4u43_Ck0-Y0xiXU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/htPSlqeyfp4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/9196218531582930388/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/05/how-to-iterate-through-all.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/9196218531582930388?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/9196218531582930388?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/htPSlqeyfp4/how-to-iterate-through-all.html" title="How to iterate through all Subdirectories till the last directory in VBA" /><author><name>Shasur</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_s2jU7girbyM/S_jNjT3UYsI/AAAAAAAACkI/_t-Xu_ob0P8/s72-c/Filesystemobject+Reference+VBA.PNG" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/05/how-to-iterate-through-all.html</feedburner:origLink></entry></feed>

