Excel VBA Worksheet.Select Method to select worksheets

This Excel VBA tutorial explains how to use Worksheet.Select Method to select a single worksheet or multiple worksheets. Select worksheets in Excel When you click on a worksheet tab, the worksheet is highlighted. To select multiple worksheets, you can hold down Ctrl and then left click the mouse on each worksheet tab. To select all worksheets at once, right click on one of the sheet, and then click on Select All Sheets One practical use of selecting multiple worksheets is to print sel...
More

Excel VBA Workbooks.Open Method

This Excel VBA tutorial explains how to use Workbooks.Open Method to open another workbook. Excel VBA Workbooks.Open Method Workbooks.Open Method is useful when you try to open another Workbook using VBA. For example, you can open a workbook > format the spreadsheet > close the workbook automatically. There are a lot of rarely used arguments for Workbooks.Open Method. As most of them are self explanatory, I will demonstrate some common uses of the Method. Syntax of Workbooks.Open Method...
More

Excel protect workbook with password

This Excel tutorial explains how to protect workbook with password with VBA and without VBA. Different kinds of workbook protection There are several kinds of protection in Excel. Add password to workbook. Users are asked to open the Excel file with password. Protect workbook with password. Protect the structure of all worksheets (do not allow insert, delete, rename, move, copy, hide or unhide worksheets) Hide worksheet with password. Hide the worksheet and add a password to unhide...
More

Excel VBA Workbook.SaveAs Method

This Excel VBA tutorial explains how to use Workbook.SaveAs Method. You may also want to read: Excel VBA convert CSV to Excel Excel VBA Workbook.SaveAs Method VBA Workbook.SaveAs Method is same as the action Save As   The options under Tools are also available in VBA Workbook.SaveAs Method.   For example, we can add password to workbook. To understand what Workbook.SaveAs Method is capable of, let's see what arguments it has. Syntax - Excel VBA Workb...
More

Excel VBA clear cell contents with ClearContents Method

This Excel tutorial explains how to clear cell contents / clear cell formats using Clear, ClearContents, ClearFormats Method. Excel VBA clear cell contents There are several kinds of "clear" related Excel VBA Methods for different scenarios. I will also explain how to clear single cell contents, clear merged cells contents, and clear blank cells. Clear single cell contents with ClearContents There are two ways to clear single cell contents (clear value in a Cell but not formatting) As...
More

Excel VBA LinkInfo Method

This Excel VBA tutorial explains VBA LinkInfo Method to check status of linked workbook. You may also want to read: Excel find all external links and broken links in workbook Excel VBA LinkInfo Method Workbook LinkInfo Method is usually used to check status of linked workbook, so that we know whether the workbook link is broken or normal. Usually this Method is used with LinkSources Method. Syntax of LinkInfo Workbook.LinkInfo(Name, LinkInfo, Type, EditionRef) Name Required...
More

Excel VBA protect worksheet with password

This Excel VBA tutorial explains how to use VBA to protect worksheet with password. You may also want to read: Excel VBA hide worksheet with password (xlVeryHidden) Excel VBA Add password to Excel workbook in folder Protect VBA code with password Different kinds of workbook protection There are several kinds of protection in Excel. Add password to workbook. Users are asked to open the Excel file with password. Protect workbook with password. Protect the structure of all w...
More

Excel VBA Worksheets.Copy Method to copy worksheet

This tutorial explains how to copy worksheets using Worksheets.Copy Method in Excel VBA, and demonstrate how to copy worksheet to another workbook. You may also want to read: Excel VBA Worksheets.Add Method to add new worksheet Excel Workbooks Open Method and check if workbook open Excel VBA Consolidate worksheets into one worksheet Excel VBA Worksheets.Copy Method to copy worksheet Excel VBA Worksheets.Copy Method is to copy worksheet in a workbook. You can copy worksheets from on...
More

Excel VBA Copy Range and Paste Method

This Excel VBA tutorial explains how to copy Range and paste data using VBA Excel VBA Copy Range Method Range.Copy Method is a very convenient Method to copy and paste Range to destination in one line of code. All the formatting will be copied and pasted. You can copy a Range, a column, a row. Syntax Range.Copy(Destination) Destination is optional. If not specified, Excel copies the Range to the Clipboard. In some cases, we may just want to copy to Clipboard and then use Paste/PasteSp...
More

Excel export Excel to PDF with and without VBA

This Excel tutorial explains how to export Excel to PDF with and without VBA, how to export all worksheets to one PDF, and export all worksheets to separate PDF. You may also want to read: Select multiple worksheets using Excel VBA Excel export Excel to PDF In Excel, navigate to File > Save As, in the Save As Type,  you can save a file as different file types. Below is the available types in Excel 2013. In this tutorial we are going to focus on exporting Excel to PDF. Now se...
More