top of page
Blog posts
Search
Multi-line input box
The standard VBA.InputBox (and Application.InputBox, available if working in Excel) only allow you to enter a single line of text. What to do if you want to allow a user to enter multiple lines of text? Use a UserForm with a multiline TextBox ...
Dec 4, 20253 min read


Drawing individual pixels with the Windows API
This post demonstrates how to use the SetPixel and GetPixel Windows API Functions to set (and get) the colour of individual pixels on the surface of a UserForm.
Sep 23, 20252 min read


Filter a ListBox using a TextBox
Show a UserForm with a ListBox which can be filtered by typing one or more characters into a TextBox.
Feb 24, 20253 min read


Version Control for VBA
Turn back the clock and revert to an earlier version of your code or just view changes that have been made since an earlier point in time.
Jun 20, 20247 min read


Multiple choice UserForm in VBA using a ComboBox
Multiple choice UserForm in VBA using a ComboBox - this UserForm allows a user to make a choice when there are more than just Yes/No or OK/C
Jul 28, 20233 min read


Dynamically adding controls to a UserForm and reacting to their events
Programmatically adding controls to a UserForm and reacting to their events
Mar 31, 20235 min read


Changing UserForm Button colour on mouse hover
Something that brings a UserForm to life is, when the mouse pointer hovers over a Button, there's an indication that the Button is clickable
Mar 8, 20233 min read


VBA and FaceIds
A FaceId, in VBA, is a small picture/icon added to a CommandBarButton which is an item in a menu. The main menus in all Office...
Aug 25, 20223 min read


Make a UserForm transparent
The following code will make the entire UserForm transparent. I'm sure there is a practical use for this, I'm just now sure what it is! 1. In the UserForm's code in the declarations area, add the Windows API calls and associated constants 2. And in the UserForm's code area below the declarations, add the SetTransparency procedure 3. And from the UserForm_Initialize event, call the SetTransparency procedure 4. That's it. The only thing left to do is to display the User
Feb 26, 20221 min read


Hide a UserForm's title bar
The following code will hide the whole title bar of the UserForm window. Why would you want to do this? The only time I do is when showing a modeless 'progress bar' dialog. 1. In the UserForm's code in the declarations area, add the Windows API calls and associated constants 2. And in the UserForm's code in the procedures area, add this SetNoTitleBar procedure 3. And from the UserForm_Initialize event, call the SetNoTitleBar procedure 4. Display the UserForm (in this exam
Feb 25, 20221 min read


Articles: Blog2
bottom of page