VBA & macros
Automate repeat work with macros and VBA code.
- Macro Recorder Best Options for Excel and Windows PCsThe best macro recorder depends on what you want to automate: for repeated tasks inside Excel, start with Excel’s built-in Record Macro…
- Excel VBA Split: Separate Text with the Split FunctionExcel VBA’s Split function separates a string wherever it finds a specified delimiter and returns the resulting pieces as an array. For…
- VBA Function Arguments: Types, Defaults, and ExamplesVBA function arguments are the values or variables supplied when a function is called; the function’s parameter list declares what it accepts…
- LibreOffice Macro Recorder: Setup and LimitsYes—LibreOffice includes a built-in macro recorder, but it is limited: it captures some actions in Calc and Writer and turns them into…
- VBA Split Function: How to Break Text into an ArrayIn VBA, use the Split function to divide a string wherever a specified delimiter appears; it returns the pieces in a zero-based…
- Excel VBA Sleep: Pause a Macro SafelyTo pause an Excel VBA macro on Windows, declare the Windows API function Sleep in a standard VBA module, then call it…
- Is Macro Recorder Free? Costs, Trials, and AlternativesSometimes: many macro recorders have a free version or are included with software you already use, while others are paid apps or…
- VBA Array Slices: How to Extract and Copy Array Parts SafelyVBA has no built-in array-slice syntax: to take a range of elements, copy them into a new array with a loop. For…
- Excel VBA Set Column Width: Code, Units, and Common FixesTo set a column width in Excel VBA, assign a value to the column’s ColumnWidth property, such as Worksheets("Sheet1").Columns("B").ColumnWidth = 20. The…
- Excel Goal Seek Macro: VBA Code and How to Run It SafelyAn Excel Goal Seek macro is VBA code that asks Excel to change one input cell until a formula reaches a specified…
- Excel VBA Set Cell Value: Examples and Common IssuesTo set a cell value with Excel VBA, assign a value to a worksheet range, such as Range("A1").Value = "Ready". In a…
- VBA Array Set: Assigning and Initializing Arrays in ExcelIn VBA, you do not use Set to assign an array: use ordinary assignment for array values, and use Set only when…
- Gamepad Macro Recorder: How It Works and What to KnowA gamepad macro recorder captures a sequence of controller inputs—such as button presses, stick movements, and pauses—and plays that sequence back when…
- VBA Array Search: Find Values with Loops or MatchTo search a VBA array, loop from LBound to UBound, compare each element with the value you want, and stop when you…
- Excel VBA Select Case: Syntax and ExamplesIn Excel VBA, Select Case runs one block of code based on the value of an expression, making it a clear alternative…
- Excel Macro to Protect a Sheet With a PasswordTo protect the active worksheet with a password in Excel for Microsoft 365 on Windows, run a VBA macro that calls the…
- Excel VBA Resize: Change a Range’s Size with VBA CodeIn Excel VBA, use the Resize property to refer to a range with a different number of rows or columns: it keeps…
- Fortify Macro Recorder: Does Fortify Record Macros?No: OpenText Fortify is an application-security product family, not a macro recorder, and its standard tools do not record mouse or keyboard…
- VBA Array of Arrays: How Nested Arrays WorkYes. VBA can store an array inside an element of a Variant array, creating a jagged or “array of arrays” structure. You…
- Excel VBA Remove Duplicates: Methods and Safe CodeTo remove duplicate rows with Excel VBA, call the range’s RemoveDuplicates method and specify which columns define a duplicate. For example, a…
- Macro Recorder in Excel: Record Actions as VBA CodeIn Excel for Microsoft 365 on Windows, the macro recorder turns many actions you perform in a workbook into Visual Basic for…
- Excel VBA Regex: Use Patterns to Find and Replace TextYes. In Excel VBA for Windows, you can use regular expressions by creating a VBScript.RegExp object, then calling its methods to test,…
- VBA Array Length: Count Elements and Find BoundsIn VBA, calculate an array’s length as UBound(array) - LBound(array) + 1. The expression works for a one-dimensional array with any lower…
- Chrome Macro Recorder: Built-In Tools and ExtensionsChrome does not include a general-purpose macro recorder for automating any website, but it does have a built-in DevTools Recorder for recording…
- Excel VBA Refresh All: How to Update Workbook DataTo run Excel’s Refresh All command from VBA, use ThisWorkbook.RefreshAll in a macro. It asks Excel to refresh the workbook’s external data…
- VBA Array Index: Bounds, Options, and ExamplesIn VBA, an array index is the number inside an array’s parentheses that identifies an element, such as values(0) or values(1). The…
- VBA Array Declaration: Syntax, Types, and ExamplesIn VBA, declare an array with a variable name followed by parentheses, then specify its element type: for example, Dim scores(1 To…
- Excel VBA Reference: Where to Find It and How to Use ItAn Excel VBA reference can mean either Microsoft’s documentation for Excel’s VBA object model or a library that a VBA project needs…
- Excel UserForm Command Button: Setup and VBA GuideAn Excel UserForm command button is a clickable control that runs VBA when the user selects it. Add it from the VBA…
- Best Macro Recorder for Gaming: Tools for Every SetupFor most players who already use compatible Logitech gear, Logitech G HUB is the best starting pick: it can record and assign…