Tags » Vba

Day 1: 486 Days of Project Euler

Euler Problem 22

I have decided to try out a project. I will attempt to complete one Project Euler problem per day, using only Excel files and VBA code. 300 more words


Assigning a UserForm Name to a Variable

Assigning a UserForm name to a variable can be useful where you have more than one userform performing the same or similar actions. You can Set the variable in the user form module and pass it as an argument to the subroutine where the main code is housed. 89 more words


The Immediate Window

The Immediate Window is a really useful debug too while writing and testing your code. Here are some of me favourite uses. 165 more words


Working with Dynamic Ranges 1

Dynamic ranges are really useful as they adapt to the content within a workbook. This allows for expansion or contraction of content and improves code efficiency by only running on necessary content, i.e. 103 more words


Clone VBA Modules

As you start to create more and more code you will likely come across instances where you can recycle pre-existing code.

Whilst you can copy and paste the code itself you can also drag and drop existing modules into a new workbook, which will create an exact copy of the module. 73 more words


Compile Error, Can't Find Project or Library

If experiencing compile errors when using Worksheet Functions (Right, Max, Average, etc) in VBA, you may be missing some References

Go to: Tools > References… 21 more words


Using Static Variables to halt Change Events

When working with worksheets in VBA you can set Application.EnableEvents to False so that and changes you make to the worksheet using VBA code do not trigger the Worksheet_Change event. 224 more words