Excel VBA Import CSV into Excel using Workbooks.OpenText Method

This Excel VBA tutorial explains how to import CSV into Excel automatically using Workbooks.OpenText Method. You may select different delimiters such as Tab, semicolon, comma, space. You may also want to read: Import Chinese CSV to Excel Excel VBA convert CSV to Excel Excel VBA Import CSV into Excel using Workbooks.OpenText Method In Excel workbook, you can manually import a CSV file into Excel (Data > From Text / CSV). However, you have to select some options in advance such as delimi...
Read More

Excel VBA Range PasteSpecial Method

This Excel VBA tutorial explains how to use Range.PasteSpecial Method to paste special such as paste values. Excel VBA Range PasteSpecial Method In Excel worksheet, if you copy a Cell and then Paste Special, you can see a list of options. The most commonly used Paste Special is Paste Values, in order to remove all the formula. In Excel VBA, Paste Speical is done through Range.PasteSpecial Method. Syntax of Range.PasteSpecial Method Range.PasteSpecial(Paste, Operation, SkipBlanks, Tran...
Read More

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...
Read 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...
Read 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...
Read 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...
Read 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...
Read 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...
Read 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 Excel VBA copy contents of protected worksheet 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 work...
Read 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...
Read More