MS Office and VBA
This category holds articles regarding general things in MS Office VBA independent from the MS Office application.
The below method will replace all special or escape characters in a provided String.
This is of use, if you have to use before unknown Strings from any source for example in a file name.
Source Code
Enjoy.
- Hits: 12486
Rarely I've come across the following problem in Excel VBA.
Some source code is definitely correct, but it just won't compile. I could one time confirm different Excel versions to be the root cause of the issue. Even though I slightly adjusted the source code in the target version of Excel, the compiler still showed funny error messages.
The trick that did solve the issue in the end was to cut the whole source code, compile and save the empty source code objects (modules, classes, etc..), paste the source code into target objects again and then compile as well as save in the target version of Excel.
From my understanding the file still held bits of the older version of Excel. However, I experienced this also using the same version of Microsoft Access on the same machine. Cutting and then pasting the source code with saving in between did the trick again.
- Hits: 10743
If you want to export a collection of type Scripting.Dictionary into a text file the below function may come handy.
- Hits: 11808
Page 2 of 4