Excel VBA Application Calculation Property

This tutorial explains Excel Application Calculation Property and difference among xlCalculationAutomatic, xlCalculationManual, xlCalculationsemiautomatic Excel VBA Application Calculation Property In Excel worksheet, there are three options under Workbook Calculation. The options in Workbook Calculation uses Calculation Property in Excel VBA, which means if you execute the corresponding VBA code, the Excel options change accordingly. Excel Option Description VBA Automatic...
More

Return Access Form input to Access Report or Form or Query

This tutorial explains how to return Access Form input to Access Query, Access Report, Access Form MS Access Search Form In order to explains how to return Access Form input to Access Query, Access Report, Access Form, , I will illustrate with a room booking system example. To goal of the below example is to allow employee search which room he has booked in the system. Step 1 - Create a room booking database In this database, I created four fields, each employee can book multiple ro...
More

Access VBA DoCmd.RunSQL Method and Error 2342

This tutorial explains how to use Access VBA DoCmd.RunSQL Method command and cause of Error 2342 (due to using non-action query such as Select statement) Access VBA DoCmd.RunSQL Method and Error 2342 DoCmd.RunSQL Method runs specified SQL statement. The SQL statement can only be action query (such as create table, modifying data), but not Select statement. Syntax of DoCmd.RunSQL Method DoCmd.RunSQL(SQLStatement, UseTransaction) SQLStatement A string expression that's a valid SQL st...
More

Excel VBA Custom Function check if worksheet exists

This tutorial explains how to use Excel VBA Custom Function to check if worksheet exists, and add new worksheet if worksheet doesn't exist Excel VBA Custom Function check if worksheet exists Sometimes we want to manipulate worksheet in a workbook but we are not sure if the worksheet exists. For example, we want to add a worksheet, if it already exists, skip the adding worksheet code. VBA code - Custom Function to check if worksheet exists There are many Functions on the internet that do the ...
More

Excel VBA Worksheets.Add Method to add new worksheet

This tutorial explains how to add new work sheets using Worksheets.Add Method in Excel VBA, or add new worksheets at the back or before specific worksheet You may also want to read: Excel VBA Worksheets.Copy Method to copy worksheet Excel VBA Worksheets.Add Method to add new worksheet Excel VBA Worksheets.Add Method is to add new worksheet in a workbook. Syntax of Excel VBA Worksheets.Add Method Worksheets.Add([Before],[After],[Count],[Type]) Before Optional. Add new worksheet ...
More

VBA Access Excel Remove duplicates in text

This tutorial provides a custom Access Excel VBA Function to remove duplicates in text, parameters provide flexibility of case sensitivity and delimiter You may also want to read: Access Excel Scripting Dictionary store unique array item VBA Access Excel remove duplicates in text This tutorial is to help you to remove duplicates in text (in a Cell), but it is not about removing duplicated Cell value in a column. To remove duplicated Cell value in a column, highlight the column, navigate ...
More

Excel VBA ASC Function to get ASCII value of text

This page explains how to use Excel VBA ASCFunction to get ASCII value of a text, and how to check if a text contains an alphabet, number or symbol What is Excel VBA ASC Function? Excel VBA ASC Function returns the ASCII value of the first character in a text. ASCII (American Standard Code for Information Interchange) uses 8-bit code units, an old encoding system which stores mainly numbers, lowercase letters a to z, uppercase letters A to Z, basic punctuation symbols, control codes. Many ol...
More

Excel VBA Option Explicit to force declaration of variables

This tutorial explains how to use Option Explicit to force declaration of variables in Excel VBA (enable Require Variable Declaration) You may also want to read: Difference between Dim and Set Difference between ByRef ByVal Function, Sub, Method, Property Differences What is VBA Option Explicit? Option Explicit is a keyword declared on top of the Visual Basic Editor in the coding Windows outside any Procedures. In the presence of Option Explicit keyword, all variables must be de...
More

Access Excel VBA MID Function to extract substring

This tutorial explains how to use MID Function to extract substring from a string in Excel / Access VBA Excel / Access VBA MID Function MID Function is quite similar to LEFT Function and RIGHT Function, where RIGHT Function extracts a substring on the right, LEFT Function extracts a substring on the left, while MID extracts a substring in the middle of the string. MID Function is commonly used with INSTR Function, which returns the position of the string (In Excel worksheet, use Search Func...
More

VBA Excel Hide Blank Rows Automatically

VBA Excel Hide Blank Rows Automatically This is a question originally posted in Microsoft Community about Excel hide blank rows. https://answers.microsoft.com/en-us/office/forum/office_2007-excel/automatically-unhide-a-row-on-sheet-2-when-data-is/b1c85ae4-d0a8-4339-86c4-4ee68471ff73 The user has a worksheet called Sheet1 that is dynamically changed. Another worksheet, Sheet2, contains a range of formula that references to Sheet1. If the corresponding Sheet1 data is blank, Sheet2 Cell show...
More