VBA - User dialog - dialogfunc

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marco Kunze

    VBA - User dialog - dialogfunc

    Hi,

    when using user dialogfs in VBA I do not realy understand the dialog
    function actions. May anyone please explain me the actions 3 - 5?

    Thanks, Marco

    Function dialogfunc(DlgI tem$, Action%, SuppValue%) _
    As Boolean
    Select Case Action%
    Case 1 ' Dialog box initialization
    ...
    Case 2 ' Value changing or button pressed
    ...
    Case 3 ' TextBox or ComboBox text changed
    ...
    Case 4 ' Focus changed
    ...
    Case 5 ' Idle
    ...
    Case 6 ' Function key
    ...
    End Select
    End Function
  • Jean Fournier

    #2
    Re: VBA - User dialog - dialogfunc

    Description A dialogfunc implements the dynamic dialog capabilities.

    Parameter Description

    DlgItem This string value is the name of the user dialog item's field.

    Action This numeric value indicates what action the dialog function is

    being asked to do.

    SuppValue This numeric value provides additional information for some

    actions.

    Action Description

    1 Dialog box initialization. DlgItem is a null string. SuppValue is

    the dialog's window handle. Set dialogfunc = True to terminate

    the dialog.

    2 CheckBox, DropListBox, ListBox or OptionGroup:

    DlgItem's value has changed. SuppValue is the new value.

    CancelButton, OKButton or PushButton: DlgItem's button

    was pushed. SuppValue is meaningless. Set dialogfunc =

    True to prevent the dialog from closing.

    AccuTerm 97 Scripting Language Reference 37

    3 ComboBox or TextBox: DlgItem's text changed and losing

    focus. SuppValue is the number of characters.

    4 Item DlgItem is gaining focus. SuppValue is the item that is

    losing focus. (The first item is 0, second is 1, etc.) Note: When

    the first item receives the focus there is no item that is losing

    focus. In that case SuppValue is -1.

    5 Idle processing. DlgItem is a null string. SuppValue is zero.

    Set dialogfunc = True to continue receiving idle actions.

    6 Function key (F1-F24) was pressed. DlgItem has the focus.

    SuppValue is the function key number and the shift/control/alt

    key state.

    Regular function keys range from 1 to 24.

    Shift function keys have &H100 added.

    Control function keys have &H200 added.

    Alt function keys have &H400 added.

    (Alt-F4 closes the dialog and is never passed to the Dialog

    Function.)


    Comment

    Working...