(C) 2009 - 2014 by Mourad Louha · All rights reserved

UserForm design for the Excel Soccer Planner Addon

Today, the second article of my series on the development of the additional tool for Excel Soccer World Cup 2010 Planner. Those who deal with Excel VBA, are certainly aware that own forms or UserForms can be created and be filled with controls. The design of the controls and the UserForm lies on older Windows versions and is – in my opinion – by its appearance a little bit boring. Below is a screenshot of the same UserForm, on the left side you can see the default design and on the right side an alternative variant.

Excel Soccer Worl Cup 2010 Planner Addon

Basically, it is of course not wrong to use the controls in the way shown on left side of the screenshot. However, I personally prefer brighter backgrounds and meaningful symbols as a button replacement. Let’s have a look to the UserForm as it will display in the tool. The example shows the controls for the options for the application settings. PS: the image also allows us a glimpse to the later features.

Excel Soccer Worl Cup 2010 Planner Addon

These controls are placed on a page of a MultiPage control. Unfortunately it is not possible to setup a background color at design time. So, I created a label, setted up the background color to white and placed it to the background. Then, I created and positioned the other labels, the texboxes and the comboboxes.

Excel Soccer Worl Cup 2010 Planner Addon

In a next step, I changed the following properties for the controls:

  • SpecialEffect was changed to fmSpecialEffectFlat instead of fmSpecialEffectSunken.
  • BorderStyle was changed to fmBorderStyleSingle instead of fmBorderStyleNone.
  • BorderColor was changed to a user defined color.
  • BackStyle was setted to fmBackStyleTransparent.

So, we have this state, as you can see in the screenshot below:

Excel Soccer Worl Cup 2010 Planner Addon

Look quite a bit better. Then, I had to insert some image controls for using icons in the UserForm. Fortunately, I have a sufficiently large library of icons in PNG format stored on my hard drive and they can be easily resized to a smaller size and stored in the bitmap format. As mentionned in the last post concerning the Excel Soccer World Cup 2010 Planner, you can find may icons on the website www.iconfinder.net, where most of the icons and symbols are free. I also inserted the hidden textboxes for the tooltips on my UserForm.

Excel Soccer Worl Cup 2010 Planner Addon

The image above also shows to icons for saving the changes and getting back to the main page. The grayed icons below are used in case the feature is disabled; the code just hides and unhides them.

So, the design of the settings page is completed now I can start to code. The other pages, for example for the export and import features, will be created in the same manner.

In the next article I will report about the development of ab own MsgBox feature for the planner addon, as the built in MsgBoxes are also gray and do not really fit into the design here.

This article has also been published on my other blog www.software.maninweb.de
and on the German Version of the Excel Ticker blog.

 
Comments

Trackbacks for this post

Leave a Reply