Questions tagged [vba]
Visual Basic for Applications (VBA) is an event-driven programming language first introduced by Microsoft in 1993 to give Excel 5.0 a more robust object-oriented language for writing macros and automating the use of Excel. It is now used for the entire Office suite and over 200 non-Office hosts.
                1,297 questions
            
            
            
                2
            
            votes
        
        
            
                0
            
            answers
        
        
            
                71
            
            views
        
        
            
            
        Generating a tracker/workbook and Outlook email
                    Generating a tracker/workbook (and Outlook email) that efficiently takes in 5 CSV files via VBA.  What are my worst practices (areas of opportunity)?
It should be assumed that only the needed CSV ...
                
            
       
        
            
                2
            
            votes
        
        
            
                0
            
            answers
        
        
            
                118
            
            views
        
        
            
            
        Indexing into Nested Data Structures in VBA
                    Project
I have created a VBA module called Idx which you may find here on GitHub. It is inspired by pluck() and ...
                
            
       
        
            
                4
            
            votes
        
        
            
                1
            
            answer
        
        
            
                251
            
            views
        
        
            
            
        Using Lightweight Objects in VBA
                    Lightweight Objects implementation in VBA7 (32/64-bit)
As shown here, VB* class instance deallocation becomes exponentially slower the more instances of a particular class module there are.
Cristian ...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                112
            
            views
        
        
            
            
        Counting the number of instances of a class module in VB*
                    In VBForums I found the following post:
Is there a way of retrieving the number of instances of a VB* class from within the class itself?
One could store an instance counter in a Public variable in a ...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                130
            
            views
        
        
            
            
            
        Collection Utilities for VBA
                    Background
I am building a complex, standalone class.  It has a property called .Mapping, which should behave like a Dictionary.
...
                
            
       
        
            
                6
            
            votes
        
        
            
                1
            
            answer
        
        
            
                113
            
            views
        
        
            
            
            
        Excel Bookkeeping Application, Create Ledgers from Chart of Accounts and Journal
                    I am writing an Excel bookkeeping application that would be suitable for a small business or contractor.  The application is based on a book on double entry bookkeeping:
https://www.amazon.co.uk/gp/...
                
            
       
        
            
                13
            
            votes
        
        
            
                0
            
            answers
        
        
            
                577
            
            views
        
        
            
            
            
        Faster VB6 / VBA class deallocation
                    For latest additions, see Edit sections at the bottom of this question.
VB6 / VBA is slow to deallocate class instances
VB* class instance deallocation becomes exponentially slower the more instances ...
                
            
       
        
            
                7
            
            votes
        
        
            
                2
            
            answers
        
        
            
                322
            
            views
        
        
            
            
        VBA: Efficiently Organise Data with Missing Values to Achieve Minimum Number of Tables
                    The task is to create sub-tables from an original table (like below) that contain the missing data columns (missing data is highlighted in red). The important part of this task is to make the smallest ...
                
            
       
        
            
                3
            
            votes
        
        
            
                1
            
            answer
        
        
            
                171
            
            views
        
        
            
            
            
        VBA code used to build a diverse portfolio of DFS lineups to minimize risk
                    This code works great and does exactly what I want but it takes around 10 minutes for the code for find 150 lineups. I am hoping to get help and learn how to make it much faster.
The goal of this code ...
                
            
       
        
            
                3
            
            votes
        
        
            
                0
            
            answers
        
        
            
                152
            
            views
        
        
            
        Evaluating WinAPI, PowerQuery, PowerShell, and FileSystemObject for File Retrieval Using VBA
                    Traditionally, VBA developers rely on the FileSystemObject to retrieve files within a directory.  I decided to test and compare different methods (Windows API, PowerQuery, PowerShell, and ...
                
            
       
        
            
                3
            
            votes
        
        
            
                1
            
            answer
        
        
            
                142
            
            views
        
        
            
            
            
        Search through all the sub-folders in a given folder for files
                    I use the below code to loop through a list of data and search through all the sub-folders in a given folder for files which match my requirements.
Right now it takes this code about 22 minutes to run,...
                
            
       
        
            
                2
            
            votes
        
        
            
                0
            
            answers
        
        
            
                306
            
            views
        
        
            
            
        Simulating Objects with Collections in VBA
                    Update
I have released a prototype (v0.1.0) of my SOb project, which is a generalized framework for easily simulating objects.
Background
I am writing a VBA module ...
                
            
       
        
            
                4
            
            votes
        
        
            
                1
            
            answer
        
        
            
                165
            
            views
        
        
            
            
            
        Speed up recursively looping through network folder and subfolders in VBA
                    I'm trying to loop through around 100k files in varying degrees of nested directories using vba and md5 hashing each of those files. Right now, the current state of the program takes around 1.5 to 2 ...
                
            
       
        
            
                5
            
            votes
        
        
            
                1
            
            answer
        
        
            
                158
            
            views
        
        
            
            
            
        Update Member "In Place" within VBA Collection
                    Background
I encountered this issue a while back, where I tried to "set" the value of a member "in place", without changing its position within the ...
                
            
       
        
            
                3
            
            votes
        
        
            
                0
            
            answers
        
        
            
                395
            
            views
        
        
            
        Fluent VBA: Two (Almost Three) Years Later
                    Part 1 - A fluent unit testing framework in VBA: A fluent unit testing framework in VBA
Part 2 - Fluent VBA: One Year Later: Fluent VBA: One Year Later
Two (almost three) years have now passed since I ...
                
            
       
         
         
         
        