Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Browse by Tags

  • In a class module, why use an unrestricted property?

    Over the years, I have followed the “best practice” of always using a property get and let/set combination rather than just declaring a public variable. But, over the last few months I’ve started questioning this dictum. Now, before people start jumping up and down, I am aware of the many very, very good reasons why [...] Read More...
  • Bushy Trees

    A favorite peeve of mine is code with “bushy trees.” I first saw this phrase in Kernighan and Plauger’s Elements of Programming Style. Recently, I saw some code that checked if a RefEdit control referred to a single cell that contained a non negative integer. I cleaned up the formatting some since the original [...] Read More...
  • Pages to Print

    In Microsoft Word’s print dialog, there’s a textbox called Pages. In it, you can specify which pages you want to print by separating individual pages and page ranges by a comma. I have a small app wherein I enter a starting serial number and an ending serial number. The output is [...] Read More...
  • String Building Class

    I read that someone uses a string builder class in vba. For some reason, that thought had never occurred to me, but I thought I’d give it a try. Here’s my first attempt. Private msText As String Public Property Get Text() As String     Text = msText End Property Public Sub Append(sText As String, Optional sDelim As [...] Read More...
  • Make Plural

    As part of “class module week”, I need a function that takes a class module name and makes it plural. I’d like to catch more than 95% of standard nouns and throw in a few non-standard ones for good measure. Here’s what I have so far. Function MakePlural(sWord As String) As String       [...] Read More...
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.