-
I’ve been following Dick’s VBHelpers Build series (1, 2, 3) and his last post reminded me that, from time to time, I need to sort a collection of items in-memory.
I don’t have to sort all that often, so my approach has changed over time. I’ve kind of settled on the following....
-
Hi everyone!
Yesterday I experienced the tedious task of figuring out what the differences are between the VBA projects of two different versions of a customer project I built a long time ago. Luckily there are tools to compare differences in text files, such as ExamDiff.
But the VB editor doesn’t...
-
Procedure arguments, either for a subroutine or a function, are declared either as ByVal or ByRef. The use of ByVal means that the called procedure does not want to change the value of the argument passed to it whereas the use of ByRef means that the called procedure may change the value.
This note looks...
-
This was motivated by a question in the mrexcel.com forum. The person asking for help had multiple comboboxes in a userform, each of which contained the same items, A through L for the purpose of this exercise. These items were sorted alphabetically. He wanted that when the user selected an item in ...
-
In my previous post on a Custom Collection Class, I used an example of a People collection with Person items.
As well as First Name, Last Name, and City, I had originally included the Gender property (Female, Male, Unknown), but removed it just prior to posting.
I purposely left it out because I didn’t...
-
When I first started programming in Excel VBA, I had problems using Class modules.
I had done plenty of reading on Object Oriented programming, but I just didn’t understand the attraction.
Years of programming in assembly language had wired my brain in a way incompatible with OO and every time...
-
I recently complained about listing conditional formatting in 2007. Now it’s time to do 2003. Excel 2003 was a little easier in some ways and harder in others. Far less “Types” to worry about, but no AppliesTo property. So I had to go cell by cell and check for FormatConditions. Whenever...
-
The Application.Run method is a versatile mechanism to call a subroutine particularly in another workbook or add-in. Its one documented limitation, if we want to call it that, is that all arguments are passed by value (ByVal). So, how does one pass an argument by reference (ByRef)?
For a version in a...
-
Last month, Debra lamented:
It’s a tedious process to go through the list individually, especially since the Show Details doesn’t stay open.
I started working on a solution, but quickly grew tired of it. Then today, The Grumpy Old Programmer posted some ruby code to find the date certain blogs were last...
-
My previous post went a bit unnoticed, but I bet this one might interest some of the Office developers…
In that post, I showed how to access and modify existing parts of an Office OpenXML package. This opens up the path for us to add ribbon customisation code to an Office file. For this to happen...
-
Hi Everyone!
Today I finally found time to actually post a brand new article on my website.
Wouldn’t it be useful to be able to edit the contents of an Office 2007 OpenXML file from within VBA? Well, now you can, using the sample code and explanation in this article.
Enjoy!!
Regards,
Jan Karel...