Re: how do i close an app that has no forms?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Keith G Hicks (krh_at_comcast.net)
Date: 08/04/04


Date: Wed, 4 Aug 2004 12:10:01 -0400

I should have included more info:

Dim hINetSession As Long

hINetSession = InternetOpen("MyFTPClient", 0, vbNullString, vbNullString, 0)

' attempt to connect to the ftp site

Dim hSession As Long

hSession = InternetConnect(hINetSession, sFTPServer, "21", sFTPUser,
sFTPPwd, INTERNET_SERVICE_FTP, 0, 0)

If hSession = 0 Then

Screen.MousePointer = vbDefault

MsgBox "Problem connecting to FTP site”, vbExclamation, sAppName

Exit Sub

End If

' code in here that works with ftp site files, but is commented out during
current testing I'm doing (does not seem to affect this problem)

Dim x As Integer, y As Integer

x = InternetCloseHandle(hSession)

y = InternetCloseHandle(hINetSession)

If x = True And y = True Then

MsgBox "closed"

Else

MsgBox "not closed"

End If

I am getting a "not closed" message.