-
VBA樹林
[Excel VBA] How to Manipulate Table Fields (Columns) Individually | Using ListColumn
In Excel Tables (ListObject), columns are referred to as "Fields." Using VBA, you can process only specific columns (fields). This article introduces the basic steps to retrieve and manipulate specific columns in a table using ListColumn... -
VBA樹林
[VBA Beginner] How to Automate the “Fill Handle” (AutoFill) in Excel
Environment Edition: Windows 10 Pro Version: 20H2 Background In Excel, you often drag the small square (Fill Handle) at the bottom right of a cell to copy formulas or values continuously. I wanted to automate this operation using VBA. In... -
VBA樹林
[Excel VBA] How to Prevent Event Loops Using Application.EnableEvents | Correct Usage Guide
"Event procedures" like Worksheet_Change are very convenient features that allow macros to execute automatically based on specific actions. However, if used incorrectly, they can cause unintended infinite loops (chain reactions), causing... -
VBA樹林
[Excel VBA] How to Convert Excel Cell Ranges to JSON Format and Output It
When integrating with Web APIs or exchanging data with modern web applications, JSON (JavaScript Object Notation) is standard. The need to convert data managed in Excel into this JSON format is increasing year by year. This article expla... -
VBA樹林
[Excel VBA] How to Parse JSON Data and Write to Cells
Introduction When handling JSON data using only Excel VBA, using ScriptControl to parse data with JavaScript's eval function is a convenient method. This article explains the steps to read JSON in an array format and write the values of ... -
VBA樹林
[Excel VBA] How to Display a Folder Selection Dialog (2 Methods)
When saving files created by macros or processing multiple files in a specific folder, you often want the user to select the target folder themselves. VBA provides two main ways to display a "Folder Selection" dialog box. This article ex... -
VBA樹林
[VBA] How to Get the First and Last Cells of a Table | Locating Positions with Range and UsedRange
When manipulating table data using Excel VBA, you often need to "automatically retrieve the first and last cells of a table." For example, you might need to identify the starting position for data entry or add new data to the end. This a... -
VBA樹林
[Excel VBA] How to Wait for Microsoft Edge to Finish Loading and Get Page Content
Overview The InternetExplorer.Application object used for Internet Explorer is being phased out. For Windows 10 and later, automating Microsoft Edge is recommended. This article explains the steps to launch Edge from Excel VBA using Sele... -
VBA樹林
[VBA] How to Automatically Highlight the Selected Row | Improving Visibility in Excel
Background When working in Excel, you might lose track of which row you were looking at because there are too many columns. This is common with horizontal scrolling or long tables where it is easy to lose sight of the row containing the ... -
VBA樹林
[VBA] How to Create and Use Functions with Arguments | Returning Values
Introduction In VBA procedures, besides the Sub we have seen so far, there is another type called Function. The biggest difference between Sub and Function is that a Function can return a "return value" as the result of a process. By cre... -
VBA樹林
[Excel VBA] How to Filter with Multiple Conditions Using AdvancedFilter [Complete Sample Code]
Overview Excel's AdvancedFilter allows for flexible data extraction combining AND/OR conditions by setting a "Criteria Range" that reuses column headers. This article provides sample code to execute In-Place Filtering (only changing the ... -
VBA樹林
[VBA] How to Pass Parameters to Power Query for Dynamic Updates | Easy Guide for Beginners
Overview When creating reports by product in Excel, you may encounter situations where you want to change the target product name via a cell or VBA and immediately re-run Power Query. This article explains the steps to replace query para... -
VBA樹林
[Excel VBA] How to Get the Record and Column Counts of a Table | Using ListRows.Count and ListColumns.Count
Using structured tables (ListObject) in Excel makes data management more efficient. By using VBA, you can easily retrieve the number of records (rows) and columns (items) in a table. This article introduces how to get table size informat... -
VBA樹林
[VBA Error Fix] “Compile error: Duplicate declaration in current scope” Causes and Solutions
When you try to run a program in VBA (Visual Basic for Applications), you may suddenly encounter the error message: "Compile error: Duplicate declaration in current scope". Whether you are a beginner or an experienced user, this error ca... -
VBA樹林
[VBA Beginner] How to Check if a Cell is Blank | Implementing Input Checks with If Statements
When using Excel VBA, you may encounter situations like: "It will be a problem if the macro runs while a cell is blank..." "This is a mandatory field, but it hasn't been filled in..." This article introduces how to use VBA to determine i... -
VBA樹林
[Excel VBA] How to Get and Select the Entire Range of a Table | Mastering ListObject Range Operations
Excel Tables (ListObject) are convenient for managing structured data. However, to accurately implement operations like "getting or selecting the entire table using VBA," you need to understand how to use the table's range properties. Th... -
VBA樹林
[VBA Beginner] Mastering Arrays: From Declaration to Loops
Introduction When handling multiple pieces of data in VBA, preparing a separate variable for each one can be tedious. For example, if you are handling sales data for 12 months, declaring 12 variables is inefficient. This is where Arrays ... -
VBA樹林
[Excel VBA] How to Get and List Current Filter Conditions (Complete Sample Code)
Overview Sometimes you may want to check the AutoFilter criteria (Criteria1 / Criteria2) set on a worksheet for each column. By running the macro introduced in this article, you can display a list of which conditions are set for which co... -
VBA樹林
[VBA Beginner] How to Get the Last Day of the Month | Date Processing with DateSerial Function
When working with dates in Excel VBA, there are many situations where you want to get the "last day of a specified month." Common examples include creating reports that close at the end of the month or specifying a range from the beginni... -
VBA樹林
[VBA] Mastering Spin Buttons on Excel Sheets | A Guide to Key Properties
Introduction If you want to allow users to easily input numbers on an Excel sheet, the Spin Button (Form Control) is very convenient. Since users can increase or decrease numbers simply by clicking the up and down arrows with a mouse, it... -
VBA樹林
[Excel VBA] How to Export to CSV While Maintaining Cell Formatting (.Text Property)
When exporting Excel data to a CSV file using VBA, have you ever experienced issues like "dates becoming unintended serial numbers" or "yen marks and comma separators disappearing"? This happens because VBA reads the internal value (.Val... -
VBA樹林
[VBA] How to Use “On Error Resume Next” to Ignore Errors and Continue Processing
Introduction When an error occurs while running a VBA macro, the program usually stops. However, there are times when you might think, "It's okay if an error happens here, so please ignore it and move on to the next line." A typical exam... -
VBA樹林
[VBA x Outlook] How to Automatically Send Application Forms via Email | Attach and Send Excel Files Instantly
Background I used to manually attach Excel application forms to Outlook emails every time I created one. Since the recipient and the body of the email were almost always the same, I thought, "Can I automate this with VBA?" and decided to... -
VBA樹林
[VBA] How to Measure Macro Execution Time (Timer Function)
Introduction Have you ever wanted to know exactly how long it takes for your VBA macro to finish its process? It is very useful to compare performance with numbers, especially when handling large amounts of data or improving your code. V... -
VBA樹林
[VBA] How to Replace Cell Values | Loop vs. Replace Method
Overview When correcting data in Excel, you often encounter situations where you want to "replace a specific string with another." While it is possible to search and replace manually, using VBA allows you to automate the replacement of m... -
VBA樹林
[VBA] How to Input Text into Specified Cells in Word Tables | Basic Syntax for Coordinate Control
Background In Excel, you can easily specify cells using addresses like "A1" or "F6," but Word does not have this kind of cell notation. I investigated how to input text at a specific coordinate position in a Word table. As a result, I fo... -
VBA樹林
[VBA] How to Automatically Paste Excel Charts into PowerPoint
Copying and pasting charts created in Excel into PowerPoint slides manually can be a hassle. In this article, I will share the code and steps to automate pasting graphs from Excel to PowerPoint using VBA. Objectives Paste an existing cha... -
VBA樹林
[Excel VBA] How to Search Cells by Format (Fill Color) | Extracting Colored Cells
When you want to find "cells filled in red" or "cells with a specific font" in Excel, doing it manually can take a lot of time. This article explains how to use VBA to search for cells with a specific format and extract their content to ... -
VBA樹林
[VBA] Understanding the “Normal” Project in the Word VBA Editor
Let's take a closer look at the "Normal" project that you see in the Word VBA editor. This project plays a very important role in how you use Word. What is the "Normal.dotm" Template in Word? Role as a Global Template "Normal.dotm" is Wo... -
VBA樹林
[VBA] Introduction to Using the Collection Object! Handling Variable Lists Easily
Introduction When handling multiple data items in VBA, arrays are very useful. However, if you need to "change the number of elements during processing," you must use dynamic arrays and ReDim Preserve, which can be cumbersome. The Collec...