UserForm Enhancement
Microsoft Excel VBA UserForm Enhancement.
UserForm enhancement. The code is modified from the late Chip Pearson's article on 'Extending The Capabilities Of VBA UserForms With Windows API Functions'.
Extending The Capabilities Of VBA UserForms With Windows API Functions
To work in Excel 64bit.
The following functions are provided…
- EnableCloseButton - Enables or disables the Close button (does not affect visible state).
- HasMaximizeButton - Returns True or False indicating whether the UserForm has a Maximize button.
- HasMinimizeButton - Returns True or False indicating whether the UserForm has a Minimize button.
- HideTitleBarAndBorder - Hide title bar and border around userform, addition to the original code.
- HWndOfUserForm - This returns the windows handle (HWnd) of a UserForm.
- IsCloseButtonEnabled - Returns True or False indicating whether the Close button is enabled.
- IsCloseButtonVisible - Returns True or False indicating whether the Close button is visible.
- IsFormResizeable - Returns True or False indicating whether the UserForm is resizable.
- IsTitleBarVisible - Return True or False indicating whether the Title Bar is visible.
- MakeColorTransparent - Make a colour on a userform transparent.
- MakeFormResizable - Enables or disables the UserForm's resizability.
- SetFormOpacity - This modifies the opacity for the form from 0 (invisible) to 255 (fully opaque).
- SetFormParent - Sets the parent window of a UserForm to the Application or Workbook or Desk window.
- SetWindowShapeCircleEllipse - Sets the userform shape to a circle or an ellipse, addition to the original code.
- SetWindowShapePolygon - Sets the userform shape to a polygon dependent on the coordinates set up in array lpPoint, addition to the original code.
- SetWindowShapeRoundedRectangle - Sets the userform shape to a rounded rectangle, addition to the original code.
- ShowCloseButton - Displays or hides the Close button.
- ShowMaximizeButton - When either the Maximize or Minimize buttons are visible, both are visible but only the specified button is enabled.
- ShowMinimizeButton - When either the Maximize or Minimize buttons are visible, both are visible but only the specified button is enabled.
- ShowTitleBar - Displays or hides the Title Bar.
![userform_enhancement.png](../img/userform_enhancement.png)
If you would like an unprotected and unobsfucated version of UserForm Enhancement this can be purchased for £2.40 (including VAT) via Payhip secure checkout.