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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help Dialog issue.

Status
Not open for further replies.

Cms3

Technical User
Oct 13, 2006
1
US
I cannot seem to be able to reference the variables listed into a dialog box no matter what I do.

Here is my code thus far.

Global g_HostSettleTime%
Global g_szPassword$

Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
Dim Sessions As Object
Dim System As Object
Set System = CreateObject("EXTRA.System")
If (System is Nothing) Then
Msgbox "Could not create the EXTRA System object. Stopping macro playback."
STOP
End If
Set Sessions = System.Sessions

If (Sessions is Nothing) Then
Msgbox "Could not create the Sessions collection object. Stopping macro playback."
STOP
End If
'--------------------------------------------------------------------------------
g_HostSettleTime = 300

OldSystemTimeout& = System.TimeoutValue
If (g_HostSettleTime > OldSystemTimeout) Then
System.TimeoutValue = g_HostSettleTime
End If
Dim Sess0 As Object
Set Sess0 = System.ActiveSession
If (Sess0 is Nothing) Then
Msgbox "Could not create the Session object. Stopping macro playback."
STOP
End If
If Not Sess0.Visible Then Sess0.Visible = TRUE
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

rc% = Month ( date )

Begin Dialog UserDialog 56, 89, 151, 95, "Macro dlg test"
TextBox 0, 8, 111, 9, .TextBox1
OkButton 114, 0, 35, 14
CancelButton 119, 14, 30, 14
DropListBox 0, 34, 73, 42, "Imput1" + Chr$(9) + "POS" + Chr$(9) + "ATM" + Chr(9) + "INQ" + Chr(9) + "M/C" + Chr(9) + "<none>", .hmmm
Text 4, 0, 104, 8, "Input ref Number:"
Text 0, 22, 78, 8, "Select Trans Type:"
DropComboBox 78, 35, 71, 50, "August" + Chr$(9) + "July" + Chr$(9) + "June" + Chr(9) + "May" + Chr(9) + "April" + Chr(9) + "<none>", .DroplistBox2
Text 79, 26, 42, 8, "Month:"


End Dialog






Dim mydialog as UserDialog
On Error Resume Next
Dialog mydialog
If Err=102 then
STOP
End If



Msgbox Textbox1, hmm, DroplistBox2


System.TimeoutValue = OldSystemTimeout
End Sub
 
check out thread1-1160854

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top