Excel Workbook.BeforeClose Event

Excel Workbook_BeforeClose Event Excel predefines some popular actions that  you would do on different Objects (worksheet, workbook, button, etc), those actions are called Event. For example, activating a worksheet is an Event, closing a workbook is an Event, clicking on a button is an event. Each Object has its own list of Events, Workbook has a list of Events (e.g. close workbook, open workbook), worksheet has a list of Events (e.g. activate worksheet, edit a Cell). If you perform an Event...
Read More

Excel Workbook.Deactivate Event

Excel Workbook_Deactivate Event Excel predefines some popular actions that  you would do on different Objects (worksheet, workbook, button, etc), those actions are called Event. For example, activating a worksheet is an Event, closing a workbook is an Event, clicking on a button is an event. Each Object has its own list of Events, Workbook has a list of Events (e.g. close workbook, open workbook), worksheet has a list of Events (e.g. activate worksheet, edit a Cell). If you perform an Event,...
Read More

Excel Workbook.Activate Event

Excel Workbook_Activate Event Excel predefines some popular actions that  you would do on different Objects (worksheet, workbook, button, etc), those actions are called Event. For example, activating a worksheet is an Event, closing a workbook is an Event, clicking on a button is an event. Each Object has its own list of Events, Workbook has a list of Events (e.g. close workbook, open workbook), worksheet has a list of Events (e.g. activate worksheet, edit a Cell). If you perform an Event, s...
Read More

Excel time difference in hours minutes seconds

Excel time difference in hours minutes seconds Excel has a special way to treat Date Time value but most people are not aware of that. You need to understand the meaning of the numeric values that represent Excel Date Time in order that you can freely perform Excel date time conversion to hours, minutes, days,  etc. After you understand the meaning of the numerical values, you can easily calculate Excel time difference. I have written a post that explains conversion between time and numeric ...
Read More

Excel Date Time Conversion

Excel Date Time Conversion Excel has a special way to treat Date Time value but most people are not aware of that. You need to understand the meaning of the numeric values that represent Excel Date Time in order that you can freely perform Excel date time conversion to hours, minutes, days,  etc. After you understand the meaning of the numerical values, you can easily calculate Excel Date Time Difference. Also read the below post about calculate time difference Excel time difference in ho...
Read More

VBA Excel Workbook.Open Event

VBA Excel Workbook_Open Event Excel predefines some popular actions that  you would do on different Objects (worksheet, workbook, button, etc), those actions are called Event. For example, activating a worksheet is an Event, closing a workbook is an Event, clicking on a button is an event. Each Object has its own list of Events, Workbook has a list of Events (e.g. close workbook, open workbook), worksheet has a list of Events (e.g. activate worksheet, edit a Cell). If you perform an Event,...
Read More

Excel Auto run Macro when workbook is opened

Excel Auto run Macro when workbook is opened Excel Auto Run Macro is used when you need to call a Sub Procedure or run your actions when an Workbook is opened. For example, you can set special hotkey for Workbook when a Workbook is opened. One common use of Excel Auto run Macro is that people make application in Excel User Form and they want the Form look like a non-Excel, real Windows application. When user opens the Workbook, a Form pops up and the Excel application (the Excel background) ...
Read More

Function, Sub, Method, Property Differences

This tutorial explains differences among Function, Sub, Method, Property Excel / Access VBA. You may also want to read: Difference between Dim and Set Excel VBA Option Explicit to force declaration of variables Difference between ByRef ByVal Function, Sub, Method, Property Differences In my blog, I have categorized different VBA topics by their properties. If you don't understand Function, Sub, Method, Property Differences, you will find my tips confusing and difficult to use. Thos...
Read More

Excel VBA Assign hotkey to Macro using OnKey Method

What is Macro? Macro is a set of actions that are intended to be repeating all over again. Macro is not a word just for Excel, you can find many other software help users record a set of actions for Windows or even for specific games. The first Macro I used was EZ Macro about 15 years ago, which helped me repeat a set of actions in an online game endlessly in order to get my skill points up. Today I still use keyboard and mouse that can record Macro. Excel is very kind to have a built-in Rec...
Read More

Excel Find Function

This Excel tutorial explains how to use Excel FIND Function for Excel worksheet, and also explains the differences between INSTR and SEARCH function. You may also want to read: Extract text in brackets Remove text in brackets Excel Find Function Excel Find function is used to search a substring (part of the string) within a string and return the position of the first occurrence, note that Excel Find function is case sensitive. Excel Search function is very similar to Find functi...
Read More