VBA & macros
Automate repeat work with macros and VBA code.
- TMG Macro Recorder? Excel’s Built-In Option Explained“TMG macro recorder” is not the name of a standard feature in Microsoft Excel. If you mean recording a macro in Excel,…
- How to Use Macros in SteelSeries GGTo use a macro in SteelSeries GG, open Engine, select a compatible device, create or record a macro in its key-assignment controls,…
- VBA Function to Change a Cell Value in ExcelYes. VBA can change an Excel cell by assigning a value to its Range.Value property, usually from a macro (a Sub). A…
- Razor Macro Recorder for UO: Setup, Limits and TipsYes. Razor for Ultima Online includes a macro recorder in many classic releases: open its Macros tab, create a macro, start recording,…
- Add Libraries in Excel: Add-ins, VBA References & MoreTo add a library in Excel, first decide whether you mean an Office add-in, an Excel add-in file, or a VBA code…
- Date Data Validation in Excel VBA: Rules and ExamplesTo restrict a range to dates with Excel VBA, use each cell’s Validation object and add a date rule with start and…
- Clear Contents Macro Excel: VBA Code and Safe Use GuideIn Excel, a clear-contents macro removes cell values and formulas while leaving cell formatting in place. In Microsoft 365 for Windows, the…
- Cannot Run a Macro in Excel? Fix Common CausesIf you cannot run a macro in Excel, first confirm that the workbook is saved in a macro-capable format, then check whether…
- Add a VBA Macro to Excel: Steps, Code, and Safety TipsYes. In Excel for Microsoft 365 on Windows, enable the Developer tab, press Alt+F11, choose Insert > Module, and paste in your…
- Excel Macro MsgBox Syntax: Buttons, Results, and ExamplesIn Excel VBA, the basic MsgBox syntax is MsgBox(prompt, [buttons], [title], [helpfile], [context]). For a simple message, call MsgBox with just the…
- Write a Comment in an Excel Cell with VBATo write a comment into a cell with VBA in Excel for Microsoft 365 on Windows, use the cell’s AddComment method; it…
- Excel UserForm Scrollbar Control: Setup, Properties, and VBAIn Excel for Microsoft 365 on Windows, a UserForm scrollbar can mean either a standalone ScrollBar control for changing a value, or…
- Left, Mid, Right in Excel VBA: How String Slicing WorksIn Excel VBA, Left, Mid, and Right return selected parts of a text string: use Left(text, count) for characters at the start,…
- Enum in Excel: Create Fixed Lists and VBA EnumsExcel has no native worksheet data type called an enum. To create enum-like choices in a cell, use Data Validation with a…
- Excel VBA UserForm Coding: Build a Data-Entry FormExcel VBA UserForm coding means creating a custom dialog in Visual Basic for Applications and writing code that responds to its controls.…
- VBA Macro to Compare Two Excel SheetsA VBA macro can compare two Excel worksheets cell by cell and list mismatches on a separate report sheet. The example below…
- VBA Macro to Send Email From Excel: Setup and CodeTo send email from Excel with VBA, automate classic Outlook for Windows: place the recipient, subject, message, and optional attachment path in…
- VBA Excel String Variables: Types, Examples, and TipsIn Excel VBA, declare a string variable with Dim name As String; it stores text such as names, codes, or messages. Use…
- VBA Excel Sort Rows: Code, Options, and Common FixesTo sort Excel rows with VBA, define the complete data range, choose a key column, and apply a top-to-bottom sort. The macro…
- VBA Excel Sort Values: Examples, Options, and FixesTo sort Excel values with VBA, use the worksheet’s Sort object: set the data range, choose the column to sort by, specify…
- Excel VBA Range Names: How to Find, Create, and Use ThemIn Excel VBA, a range name is a defined name that refers to a cell, a group of cells, or sometimes a…
- VBA Excel Range Variables: How to Declare and Use ThemA VBA Excel Range variable is an object variable that refers to one or more worksheet cells, so you can read or…
- VBA Excel Reverse String: Code, Examples, and TipsTo reverse text in Excel VBA, use the built-in StrReverse function: StrReverse("Excel") returns "lecxE". For a reusable worksheet formula, put a small…
- VBA Excel Mid String: How to Extract or Replace TextIn Excel VBA, use Mid(text, start[, length]) to return characters from the middle of a string; positions start at 1, and the…
- VBA Excel Print Range: Set, Change, and Print WorksheetsTo set an Excel worksheet’s print range with VBA, assign an address to its PageSetup.PrintArea property: Worksheets("Report").PageSetup.PrintArea = "$A$1:$F$40". Then print or…
- VBA Excel Offset: How to Select a Range ReliablyIn Excel VBA, use the Offset property on a Range to refer to cells a chosen number of rows and columns away:…
- Excel VBA Intersect: Find Overlapping Ranges in a SheetIn Excel VBA, use Application.Intersect to find the cells shared by two or more ranges. Assign its result to a Range variable,…
- Excel VBA AutoFilter: Filter Data with MacrosTo filter worksheet data with Excel VBA, call the AutoFilter method on the range that includes the column headers, then specify the…
- VBA Excel Calculate Range: Methods and ExamplesTo calculate a specific range in Excel VBA, use the range’s Calculate method: for example, Worksheets("Sheet1").Range("B2:B100").Calculate. It recalculates formulas in that range…
- VBA Code to Link Excel WorksheetsTo link to a worksheet in the same Excel workbook, use VBA’s Hyperlinks.Add method with an empty Address and the destination sheet…