Suhaa
02-06-2008, 03:21 AM
When i tried to run the application from source by pressing F8, it is goes on running, it doesnt stops and i dont know from where the execution starts.
Do we have any option to change module from where the execution should start? The default module to start the executions is Sub Main ().. Please let me know am I correct..
Please Help.
DougT
02-06-2008, 03:29 AM
If you click on the Project menu item in the IDE and then Properties a window is displayed. In that window you'll see "Start-up Object" that is the name of the Form or Routine (ie submain) that is executed on start-up,
Suhaa
02-06-2008, 05:45 AM
Thank you.. I can see Sub Main as a start up object..
I tried to debug the code after setting break in second line of the Sub Main. It goes on running..It is not stopping.
To stop that I need to click the END button.
the master
02-06-2008, 06:04 AM
Can you show us the code? Your either stuck in a loop or some forms are still open
Suhaa
02-06-2008, 06:17 AM
Please find the Sub Main module below..
Public Sub Main()
Dim xForm As Form
Set acms = New AcmsDiCalls
gbHistoryOnly = False
gbytLogInStatus = False
gsReceivedDate = Format(Date, "mm/dd/yy")
gbClmFormActivated = False
Set ctlLastHcfaObj = frmHCFA.mebReceivedDate
Set ctlLastUBObj = frmUB92.mebReceivedDate
If App.PrevInstance Then
MsgBox ("This program is already running!" _
& vbCrLf & _
"You can not start another one.")
End
End If
Download_OneTime_Setup
If App.StartMode = vbSModeStandalone Then
AppStartMode = vbSModeStandalone
If Check_for_Download_Error Then
MsgBox "You currently do not have security access to log claims." & vbCrLf & _
"Please contact your supervisor to obtain the proper security." & vbCrLf & _
"This application is now aborting.", vbCritical, "CL_3000 DOWNLOAD ERROR"
End
End If
frmSplash.Show vbModal
Check_Auto_Updates
frmLogOn.Show vbModal
frmMember.Show
Else
AppStartMode = vbSModeAutomation
End If
End Sub
the master
02-06-2008, 06:24 AM
You are showing your splash screen modally. The code wont even open the main window until the splash screen is closed. Your logon form is also modal so that will have the same effect
Suhaa
02-06-2008, 06:32 AM
But I am not getting the spalsh form..
the master
02-06-2008, 06:38 AM
I cant see why. Put a load of break points on the lines and run your app. It will stop at every break point so you can see where it gets to before it stops
Suhaa
02-06-2008, 06:51 AM
I executed with a break point " Set acms = New AcmsDiCalls" in the above code. The control is not pointing at the same i didnt get any error messages. it running...
the master
02-06-2008, 06:58 AM
You need to put more break points in. Put one on every line if you want and see which 1 is the last one to execute before your app stops.
Maybe you should put one on "end sub" too and see if it reaches the end of the sub but without actually doing anything
Suhaa
02-06-2008, 07:09 AM
The application is not ending and it is coming to the beak points also. Will try with End sub and let you know..
Flyguy
02-06-2008, 08:08 AM
The strange thing I noticed in your Sub Main() is this:
Set ctlLastHcfaObj = frmHCFA.mebReceivedDate
Set ctlLastUBObj = frmUB92.mebReceivedDate
These forms have not been loaded yet, because Main() is the startup code, but you do set objects to these unloaded forms, causing the forms to be activated!
TRANSLTR
02-06-2008, 08:17 AM
What's happening in class_initialize for AcmsDiCalls... could be getting its knicker in a twist in there. Does it get past this line?
Hugh Lerwill
02-06-2008, 12:36 PM
replace;
Dim xForm As Form
Set acms = New AcmsDiCalls
with;
Dim xForm As Form
Stop
Set acms = New AcmsDiCalls
Does it stop then?
the master
02-06-2008, 05:55 PM
Flyguy makes a good point. I didnt notice you had referenced forms but as he said the forms will be activated when you run those lines of code and your app wont end while those 2 forms are open. Just because you cant see them it doesnt mean they arnt there.
You need to unload the 2 forms before exiting and using "end" is usually considered bad practice.
Why are you referencing those 2 forms anyway? Those controls are already available to all other forms and modules so why do you need a second reference?