Category: Programming
-
Get the parameters/arguments being called to an executable
Lets say you have some program ‘A’ that has no documentation and no help files but is being executed by some program ‘B’. You want to run program ‘A’ is individually, but you need to know what parameters/arguments are being passed from program ‘B’. The following executable will help. Replace program ‘A’ (temporarily) with the…
-
Optimizing/faster String Concatenation in VBA
There are numerous links about Visual Basic string concatenation, one particular is Microsoft’s How To Improve String Concatenation Performance. But the article is overwritten for the point it is trying to make, so I will share a simplified example. Lets say we want to perform the following concatenation: This takes approximately 6000 ticks. The faster…
-
Word Minimize/Maximize event capture VBA
Here is a quick little post outlining how to create a minimize/maximize event routine. Add the following code to a class named EventClassModule and then add the following code under ThisDocument
-
VBA automatically saves Excel 2003 Workbook in compatibility mode as Excel 2007 Workbook
Lets say you have a neat little Excel 2003 macro, when you run your macro in Excel 2007, Excel runs it in Compatibility Mode, and any benefits (such as the 16384 columns) you were hoping to use are still unavailable. So how can we enable these benefits depending on the Excel version? Simply by including…
-
Generic file selection window function in VBA
Here is a very useful file selection function for VBA, inputs sFilter a filter string i.e. “*.txt” and outputs an array of selected files including their path. The code is a modification of the example found on Microsoft’s MSDN FileDialog Object page.
-
Rigid file manipulation functions for VBA/VBS
Ever since starting work I have been learning and using VBA/VBS to make life easier. I will start posting some of my generic functions as a source for others. They may not be written optimally, but they do work.