Learn how to close a vba userform with escape key. Map command button to Exit or Close a Userform with Escape key.
Finding an existing file & its path using Excel VBA When writing Excel VBA code that works with external files like XML or JSON, it is important that you have controls in your code to check it the file exist. If your macro (VBA program) doesn’t find a file when […]
Get Excel worksheet caption & name (or Object name or Codename) using VBA Macro. This is a readonly property and cannot be renamed using code without giving access to VBA Project Model.
VBA code to convert html to plain text, this helps us to make the html code readable by stripping all the html tags from the html code and printing/rendering the output of the code. When we have a an Excel sheet with cells containing html. We can batch convert them […]
How to Set No or Cancel as default Msgbox button? In Msgbox with YesNo or OkCancel buttons, the first button will be set as default button. i.e., once the message box appears if user hit Enter button, Yes or Ok will be activated. Sometimes, this is not desired. In case […]
List Files in Folder using Excel VBA To get list of files in a directory, just give the folder path as input to this function. It will read the file in the folder one by one. Then display the file names. In this sample code, we will get list of […]
How to add Data validation drop down list in Excel VBA? Two different methods to create drop down list are explained here – but all are related to validation list. Note: Combo-box control that also display list of values in dropdown is not explained in this page. Adding Drop Down […]
This page explains how to save a word document to PDF using: VBA Code PDF Converter Manually Save Word as PDF Both the methods are simple & straight forward. Lets start with the automation code first. 1.VBA Code to Convert Word to PDF Word VBA has a direct function to […]