by Stefan Kloss on 30. Oktober 2009
VBA Userform: Textboxen numerisch formatieren?
Im Grunde geht das nicht, oder nur sehr schwierig. Die Standard Library MSForms (FM20.dll) liefert hier zumindest keine Möglichkeit, eine VBA Userform mit numerischen Textboxen zu erweitern. Das muss aber nicht das letzte Wort sein! Ich habe mich rangesetzt und eine kleine Toolbox geschrieben, die numerische Textboxen mit diversen Mögichkeiten zur Verfügung stellt. Lasst Euch gesagt sein, selber schreiben ist hier keine gute Variante, es ist nicht gerade trivial, zumindest mit den Bordmitteln.
Seht hierfür bitte meinen anderen Artikel: “Textbox VBA: Kostenloses Tool zum Formatieren numerischer Textboxen”. Dieser hier ist nur für die Suchmaschine.
Was man sonst noch alles mit einer VBA Userform anstellen kann, erzähle ich Euch später.
Viel Spass noch!
by Stefan Kloss on 30. Oktober 2009
VBA: Textbox in numerical format
I started writing a little toolbox for VBA programmers in VB.NET. First feature of it is the option to make a numerical textbox of any textbox on your form. Using a name-spec the tool adds this feature to all textboxes matching a given scheme like, for example “txtAmount*” or “txtCurrency*”. You can manage several formats, define the number of decimals or a range of values, combine it with a spin button and much more.
Inlcuded is a demo form within an Excel File, so you can see and test some of the features. It is in German, but I think it’s self-explanatory.

If you have any questions, please don’t hesitate to write an eMail or comment on this Post!
You can download the Installer from
www.kloss.de/downloads/sktoolbox/stefanklossToolbox4vba-Beta-1.0.1.zip.
You can see the objects and their usage in the form-code of the delivered xls-File. Also have a look at the references in order to set it up correctly. Please install the tool and add a reference to your VBA-Project.
Have fun and take it easy!