By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,359 Members | 1,481 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,359 IT Pros & Developers. It's quick & easy.

VBA - User dialog - dialogfunc

P: n/a

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(DlgItem$, 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
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
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


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

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.