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!

Help converting an Extra macro to Visual Basic

Status
Not open for further replies.

brumo

Technical User
May 30, 2008
15
0
0
US
This code works fine in Extra Basic, but I can't get it to compile in VB. I posted it here because I know some of you have had experience with both and I'm not sure what needs to change or if I'll have to start from scratch.

Code:
Function dlgFunc(identifier$, action, suppvalue)
  dlgFunc = True
  Select Case action
  Case 2
    Select Case identifier$
    Case "BtnOK"
      If dlgValue("chkbox") = 1 Then dlgFunc = False
    Case "Cancel"
      dlgFunc = False
    End Select
  End Select
End Function

Sub Main
  Begin Dialog dlgF 280, 50, "", .dlgFunc
    Text  27, 8, 253, 10, "Use the checkbox to continue"
    ButtonGroup .ButtonPressed
    OkButton  87, 26, 50, 14, .BtnOK
    CancelButton  143, 26, 50, 14 
    CheckBox 50, 26, 30, 14, "OK?", .chkbox
  End Dialog
    
  Dim dlgVar As dlgF
  Chk = Dialog(dlgVar)
  Select Case Chk
  Case -1
    MsgBox "Done"
  Case 0
    Exit Sub
  End Select
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top