Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialog Box examples...HELP!

Status
Not open for further replies.

scottmh

Technical User
Aug 26, 2003
15
0
0
US
Can anyone provide example code that I use to learn the proper use of Dialog Boxes in conjunction OptionGroup/OptionButtons? I've been trying to wrap my head around the Macro Help of Attachmate, but, can't figure out how to use the user select option with select...case

Any help is greatly appeciated
Scott
 
These are actually pretty difficult to manipulate, but here's some old code I've used before.

Code:
DialogBox:
Begin Dialog POData 135, 60, 180, 135
Caption TitleBarText$

    Text 68,30,50,15, "PO Number:"
    TextBox 76,40,24,12, .PO 

    Text 77,56,22,12, "Action:" 
    ComboBox 35,66,110,50, &quot;Add Item&quot; + Chr$(9) + &quot;Reinstate Item&quot; + Chr$(9) + &quot;Change Item&quot; + Chr(9) + &quot;Delete Item&quot; + Chr(9) + &quot;Change Header Information&quot; + Chr(9) + &quot;Delete PO&quot; + Chr(9) + &quot;Reinstate PO&quot; + Chr(9) + &quot;Change Multiple Cost on PO&quot; + Chr$(9) + &quot;<none>&quot;, .Action 

    Text 80,83,16,12, &quot;Item:&quot; 
    TextBox 76,93,24,12, .Lin 

ButtonGroup .buttons
    Button 25, 110, 50, 18, &quot;GO&quot;
    Button 105, 110, 50, 18, &quot;Stop&quot;

    GroupBox 7,2,80,22, &quot;&Facility&quot;
    OptionGroup .Facility
    OptionButton  17, 9, 13, 12, &quot;0&quot;
    OptionButton 40, 9, 13, 12, &quot;2&quot;
    OptionButton 63, 9, 13, 12, &quot;9&quot;

    GroupBox 93,2,80,22, &quot;&Warhouse&quot;
    OptionGroup .warhouse
    OptionButton  105, 9, 25, 12, &quot;034&quot;
    OptionButton 139, 9, 25, 12, &quot;035&quot;

End Dialog

Dim PODataDialog as POData

If FacCheck$ = &quot;0&quot; Then
PODataDialog.Facility = 0 
ElseIf FacCheck$ = &quot;2&quot; Then
PODataDialog.Facility = 1 
ElseIf FacCheck$ = &quot;9&quot; Then
PODataDialog.Facility = 2 
Else
PODataDialog.Facility = -1 
End If

If WarCheck$ = &quot;34&quot; Then 
PODataDialog.Warhouse = 0
ElseIf WarCheck$ = &quot;35&quot; Then 
PODataDialog.Warhouse = 1
Else
PODataDialog.Warhouse = -1 
End If

If POCheck$ <> &quot;&quot; Then PoDataDialog.Po = POCheck$
If KLNCheck$ <> &quot;&quot; Then PODataDialog.lin = KLNCheck$

Dialog PODataDialog
If PoDataDialog.Buttons = 1 Then Exit Sub

Hope this is helpful

Calculus
 
Thank Calculus. I'm sure this will help me a lot. I was so stuck trying to figure it out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top