Classification of Controls

     

  • We can classify the controls in two ways
  •  

    • Form Controls
    • Active X Controls

     

     

  • "Active X Controls" having more formatting options when compare with "Form Controls"
  •  

  • "Form Contorls" are not useful to execute VBA code.,
  •  

  • These are helpful while recording macros but not for coding the macro
  •  

  • "Form Controls" having compatibility to earlier versions of Excel., whereas "Active X controls" available from 2003 version
  •  

  • "Active X controls" having Desing Mode, through this we can edite the PROPERTIES
  •  

    In how many ways we can edit PROPERTIES of ACTIVE X CONTROLS

     

    First Way

     

  • The movement when you drag\place COMMAND BUTTON.,by default design mode will highlight
  •  

  • Right Click on command button, and select PROPERTIES as mentioned below
  •  

  • Then Propreties window will display, we can edit as per our requirement
  •  

     

    Second Way:

     

  • Open VBE
  • Click on VIEW Tab
  •  

  • Select PROPERTIES window
  •  

  • Now COMMAND BUTTON properites window has been displayed
  • We can edit as per our requirement
  • What is OLE Object

     

  • OlE Stands for Object Linking and Embedding
  •  

  • OlE Object indicates an ActiveX control or a linked OLE object on a worksheet.
  •  

    User Form - Introduction

     

     

  • User forms also termed as custom dialogue boxes
  •  

  • TOOLBOX enables the user to add controls
  •  

    CHECK BOX

     

  • It denotes TRUE\FALSE value
  • Box is CHECKED value is TRUE, else FALSE
  •  

    COMBO BOX

  • Enables the user to show LIST of items in DROPDOWN form
  • At a time only one value will appear from the available dropdown
  •  

    FRAME CONTROL

  • it is used to enclose all controls in USERFROM
  • We can FRAME the controls
  •  

    IMAGE CONTROL

  • It enables the user to drag IMAGES into userForm
  •  

    LABEL

  • It is useful to display TEXT to respective controls
  •  

    LIST BOX

     

  • It enables the user to select single\multiple items at once from the available items
  •  

    Multipage controls

  • It consists of two pages
  •  

    OPTION BUTTON

  • It enables the user to select SINGLE option\choice from the available group
  • If we select SINGLE option other option buttons are DESELECTED.
  •  

    REFEDIT

  • It enables the user to select a RANGE in a sheet
  •  

    SCROLL BAR

  • We can drag the SCROLLBAR value to change the CONTROL value
  •  

    SPIN BUTTON

  • It is enables the user to INCREASE\DECREASE the control value
  •  

    TEXT Box

  • It allows the user to enter the TEXT\Value
  • textbox1.SetFocus
  • SETFOCUS method retains cursor in textbox
  •