[RESOLVED] Help with keeping connection open
Here is my basic (sic) problem. I am connecting remotely via vpn, but the connection times out after an hour of inactivity. Well sometimes my programs run for hours against the Data Warehouse.
My solution was to write a program to wake up every 30 mins to access a remote directory and display the directory in a list box (or something like that). I have the timer thing down, but now need to access the network drive/directory to list the contents.
I just took a beginning VB class and they touched on this, but either I didn't grasp it or I just need help....
any ideas?
Thanks,Mike
Re: Help with keeping connection open
Well since I received ZERO responses, I looked at another forum and found the answer I was looking for....
I will post it here in case others want a response....
First you need to go to Project - References and click on
Microsoft Scripting Runtime....
Set objFSO = CreateObject("Scripting.FileSystemObject")
objStartFolder = "C:\Windows"
Set objFolder = objFSO.GetFolder(objStartFolder)
Set colFiles = objFolder.Files
lstFile.Clear
For Each objFile In colFiles
lstFile.AddItem objFile.Name
Next
enjoy