Macros & Excel VBA

Excel VBA: Protect Sheet with Password and Allow Filter

In this article, I’ll show you how can protect an Excel sheet with a password and also allow the filter there using VBA. Excel VBA: Protect ...

Macro to Convert Excel to Pipe Delimited Text File (3 Methods)

We have the following dataset. The contents of the dataset are relatively irrelevant to the code we'll use. Method 1 - Macro to Transfer ...

Excel VBA to Lock Cells without Protecting Sheet (4 Ideal Examples)

Generally, we protect the whole worksheet by locking cells in Excel. But we can also lock cells without protecting a sheet in Excel with VBA. Today, ...

How to Protect Specific Columns Using VBA in Excel

The dataset showcases students' marks in different subjects. Steps: Go to the Developer tab and click Visual Basic. Click Insert ...

How to Unprotect All Sheets in Excel Using VBA (4 Examples)

Below is a dataset with four protected worksheets representing sale details for the first four months of the year. We cannot change any data on the ...

Excel VBA: Read a Text File Line by Line (6 Related Examples)

To demonstrate our examples, we'll use the following text file saved in the Desktop folder. Example 1 - Read First Line of a Text File ...

How to Apply a Macro to Send an Email from Excel with Attachment

VBA Code to Send Email from Excel with Attachment (Quick View) Sub Send_Email_with_Attachment() Dim MyOutlook As Object Set MyOutlook = ...

Excel VBA: Unprotect a Workbook without using a Password – 2 Examples

The sample workbook is protected with a password. Example 1 - Copy the workbook to a New File to Unprotect it Using VBA Steps: The ...

Excel VBA: Protect Workbook with Password (3 Quick Tricks)

While working with Microsoft Excel, sometimes we need to protect our dataset for the convenience of our work. Basically, we may need to protect ...

VBA Code to Convert Text File to Excel (7 Methods)

The sample Text file named “Test File” contains random lines and Line breaks. We will learn how to convert this text file to a new Excel file with ...

Excel Macro: Save as PDF with Date in Filename (4 Suitable Examples)

In this article, I’ve discussed 4 suitable examples to save an Excel file as a PDF using the Macro with the date in the filename. How to Save ...

Excel VBA: Replace Character in String by Position (4 Effective Ways)

This article illustrates how to replace a character in a string by position using VBA in Excel with 4 effective approaches. We’ll use Excel’s ...

How to Calculate Time Difference in Excel VBA (2 Methods)

Excel VBA Code to Calculate Time Difference (Quick View) Sub Time_Difference_by_Direct_Substitution() Time1 = CDate("6:03:59 AM") Time2 = ...

How to Unprotect Excel Sheet with Password Using VBA: 3 Quick Methods

Method 1 - Perform a VBA Code to Unprotect Single Excel Sheet with Password in Excel Step 1: Open a Module, to do that, firstly, from your ...

How to Create a Simple Database in Excel VBA

Watch Video – Create a Simple Database in Excel VBA The sample data set below contains the names, joining dates, and salaries of ...

Close the CTA

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo