Friday, July 25th, 2008 286 views
If you are working on code for any Office application, you might need to reference an object library for another Office application. I've been working on code for a new add-in for Excel, and needed to write code that would reference the appropriate object library, depending on the version of ...
Posted in AddIns, Excel, VBA, automation | 6 Comments »
Friday, July 11th, 2008 226 views
So I was getting tired of constantly formatting the header row on whatever spreadsheet I am working on, hence this short sub was born. It pretties up the header row and adds autofilter arrows. Most importantly it autosizes the columns so all the information is visible. I chose Teal (ColorIndex ...
Posted in Excel, VBA | No Comments »
Tuesday, June 24th, 2008 2,572 views
In the spirit of my last post Calculate Working Days Minus Holidays in VBA, here is a function I wrote recently that returns the number of working hours between two date/time values passed to the function as arguments. It is self-contained and works independently of whatever existing code you have, ...
Posted in Excel, UDF, VBA | 9 Comments »
Wednesday, May 28th, 2008 186 views
In keeping with my Website XML parsing post, here is a short function that returns the body text from a webpage as a string, on which you can use other functions like Instr, Left$, Mid$, etc, to extract necessary data.
[vba]
Function URLText(sURL As String) As String
' check website.com using xml
' early ...
Posted in Excel, Internet Explorer, VBA, automation | 1 Comment »
Monday, April 14th, 2008 313 views
About halfway down the Outlook page, there is some VBA code for opening an Excel workbook attached to an email, running a macro on it, then cleaning up and moving the email to another folder.
Here is some more sample code to make your macro even more intelligent. This code opens ...
Posted in Excel, Outlook, VBA, automation | No Comments »