VBA & macros
Automate repeat work with macros and VBA code.
- How to Turn On Excel’s Macro Recorder in Microsoft 365In Excel for Microsoft 365 on Windows, select Developer > Code > Record Macro, set the macro’s name and storage location, then…
- Gorilla Copy and Paste VBA: Excel Methods and ExamplesThere is no standard Excel VBA command or feature called Gorilla; if you mean copying and pasting cells in Excel, use Range.Copy…
- Google Sheets Macro Recorder: How to Record and RunYes. Google Sheets has a built-in macro recorder: in a spreadsheet open in a desktop browser, choose Extensions > Macros > Record…
- Free Macro Recorder for Windows 11: Best OptionsYes. Windows 11 users can record and replay desktop actions for free with Microsoft Power Automate for desktop, while Pulover’s Macro Creator…
- Free Windows Macro Recorder: Options and How They WorkYes. You can record repetitive Windows tasks for free with Microsoft Power Automate for desktop, or use free tools built around AutoHotkey.…
- VBA Editor in Excel: Where to Find It and How to OpenIn Excel for Microsoft 365 on Windows, press Alt+F11 to open the Visual Basic Editor (VBE), where you can view and write…
- Find Unique Values in VBA: Methods and ExamplesTo find distinct values in VBA, read the source cells into a Scripting.Dictionary and add a value only when it is not…
- Excel VBA FindNext: How to Find the Next MatchIn Excel VBA, use Range.FindNext to move from one match to the next after starting a search with Range.Find. To find every…
- Filter an Excel PivotTable With VBA: Fields, Items, and CodeTo filter an Excel PivotTable with VBA, reference the PivotTable and field, clear any existing filter, then set the desired page-field item…
- Filter Dictionary Keys in Excel VBA: Code and OptionsYes. In Excel VBA, filter a Scripting.Dictionary by looping through its keys and copying the matching key/value pairs into a new dictionary;…
- Filter a Dictionary in Excel VBA: Practical ExamplesExcel VBA has no built-in Filter method for a Scripting.Dictionary. The usual approach is to loop through the dictionary’s keys, test each…
- Excel VBA Shortcut Keys: Open, Edit, and Run MacrosThe most useful Excel VBA shortcut keys on Windows are Alt+F11 to open or switch to the Visual Basic Editor, Alt+F8 to…
- Excel VBA UserForm Tutorial: Build a Data Entry FormTo build an Excel VBA UserForm, open the Visual Basic Editor, insert a UserForm, add controls such as text boxes and buttons,…
- Excel VBA Worksheet Functions: What You Can UseExcel VBA can call many worksheet functions through Application.WorksheetFunction, including Sum, Average, CountIf, VLookup, Index, Match, Round, Max, and Min. There is…
- Excel VBA Worksheet Change Event Not Working? FixesIf an Excel VBA worksheet change event is not working, first check that the Worksheet_Change procedure is in the correct worksheet’s code…
- Excel VBA UserForm Progress Bar: Build One That WorksTo add an Excel VBA UserForm progress bar, create a UserForm with a Frame and a colored Label inside it, then update…
- Excel VBA UserForm Tab Order: Set It CorrectlyTo set an Excel VBA UserForm’s tab order, open the form in the Visual Basic Editor, choose View > Tab Order, and…
- Excel VBA UserForm ListBox: Sorting Options and CodeTo sort a list in an Excel VBA UserForm, sort the values before adding them to the ListBox; the standard MSForms ListBox…
- Excel VBA UserForm Position on ScreenTo control an Excel VBA UserForm’s position, set its StartUpPosition property to 0 - Manual, then assign its Left and Top properties…
- Excel VBA UserForm Label Font Color: Set and ChangeTo change an Excel VBA UserForm label’s text color, set its ForeColor property. For example, in the UserForm’s code module, use Me.lblStatus.ForeColor…
- Excel VBA UserForm Image: Add, Load, and TroubleshootAn Excel VBA UserForm displays a picture with the Microsoft Forms Image control: add the control in the UserForm designer, set its…
- Excel VBA ComboBox: Load a UserForm List From RangeTo fill an Excel VBA UserForm ComboBox from cells, set its RowSource property to a worksheet range, or add cell values with…
- Excel VBA UserForm: Delete a Record by ID with CodeTo delete a record from an Excel VBA UserForm, identify it by a unique ID, ask the user to confirm, then delete…
- Excel VBA UserForm Dynamic List: Populate and UpdateTo create a dynamic list in an Excel VBA UserForm, clear a ListBox or ComboBox and refill it from the current worksheet…
- Excel VBA UserForm Background Color: How to Change ItTo change an Excel VBA UserForm’s background color, set its BackColor property: in the form’s code module, use Me.BackColor = RGB(240, 248,…
- Excel VBA UserForm Code Examples and SetupExcel VBA UserForms are custom dialog boxes for collecting information or guiding a task; useful examples include opening a form, filling a…
- Excel VBA UserForm Animation Effects: What Really WorksExcel VBA UserForms have no built-in animation setting for effects such as fading, sliding, or zooming. You can imitate simple effects by…
- Excel VBA: How to Turn Off Error HandlingTo turn off an error handler in the current Excel VBA procedure, use On Error GoTo 0. It disables that procedure’s active…
- Excel VBA: Turn On AutoFilter and Show Filter ArrowsTo turn on AutoFilter in Excel VBA, call the AutoFilter method on the complete data range, including its header row. For example,…
- Excel VBA UserForm Activate vs InitializeIn Excel VBA, use UserForm_Initialize to set up a form when it is loaded, and use UserForm_Activate for work that should happen…