This project is read-only.

CreateWebButton Method

Manages the creation of a cControl_WebButton object. Returns a cControl_WebButton reference.


object.CreateWebButton(commandBtn, label, Toggle, HiColor, SelectColor, ParentControlType)

object A reference to a valid cCompositeControls class instance.


Name Required / Optional Data Type Description
commandBtn Required Access.CommandButton Reference to an existing CommandButton control.
label Required Access.Label Reference to an existing Label control.
Toggle Optional Boolean Indicates whether the WebButton is to act as a toggle button or an option button. Default is False
Hi_Color Optional Long "Highlight" color of WebButton (background color set when mouse moves over control). Default is vbRed.
Select_Color Optional Long "Select" color of WebButton (background color set when mouse clicks on control). Default is vbGreen.
ParentControlType Optional ccControlType Type of control for parent object of the WebButton. Default is ccForm.


A WebButton object requires a command button and a label control to function properly. It is recommended the command button be placed directly on top of the label control.

Captions and background color changes are managed using the label control.

The command button "Cursor on Hover" property should be set to "Hyperlink Hand"


This example creates a new toggle-style web button and returns a reference to it.

Dim wb as cControl_WebButton

Set wb = myCompositeControls.CreateWebButton ([Form_myForm].Command0, [Form_myForm].Label0, True)

Last edited Dec 26, 2010 at 1:40 AM by vba_junkie, version 1


No comments yet.