Path and Filename Functions

VBA Express has what I consider to be the ideal functions for returning file name and path from a given input string. They avoid those pesky loops which I see on a few sites. As an exercise I thought of a few more ways to do so.

Continue Reading: Path and Filename Functions »

Grab any Environment Variable

In Capture a User’s Domain\UserName, Mike Alexander shows us how to use the Environ function to get the local username. This can be used to customize application messages or manage user credentials.

Using a function with a custom enumeration we can return the value of any Environ variable. Here's one way to do it.

Continue Reading: Grab any Environment Variable »

Schedule a recurring task every N minutes

You can schedule code to run every N minutes, using Outlook. I can see a lot of uses for this, for example if you needed to run cleanup code regularly, or email sorting, or anything else that needs to happen regularly at greater intervals than Outlook already provides with the built-in recurring feature.

Continue Reading: Schedule a recurring task every N minutes »

Excel 2010 changes

Another upgrade post — read this if you're upgrading to Excel 2010:

Excel 2010 Object Model Changes Since Earlier Versions

The article mentions that Application.MacroOptions has changed, but there's no indication of what has changed. I checked the Excel 2003 and 2007 Object Model Documentation and they both show the same options for MacroOptions.

The other things I noticed was that Smart Tags seem to be going the way of the dinosaur. In the Visual Studio 2010 documentation it states:

Smart tags are deprecated in Excel 2010 and Word 2010. Although you can still use the related APIs in projects for Excel 2010 and Word 2010, these applications do not automatically recognize terms, and recognized terms are no longer underlined. Users must trigger recognition and view custom actions associated with text by right-clicking the text and clicking the Additional Actions on the context menu. For more information about this change in Word 2010, see http://go.microsoft.com/fwlink/?LinkId=178847. (emphasis added)

Did anyone even use Smart Tags? I never found any use for them.