This thread is fairly old, but I'll post my solution in the event that another user is reading this for a fix.
While the following may seem simplistic, I have found it to work well for my needs.
Rather than find the exact session name, I simply have VBA cycle through all active sessions and...
As an added note:
If your version of Attachmate has a macro recorder enabled, fire it up and create a dummy macro, and plug in all of the keystrokes that are in question. Stop the recorder, go into edit mode for the dummy macro, and view the SendKeys commands used. It has worked wonders for me...
Correction:
Dim pathToFile As String
Dim fileAvail As Variant
'Open check file
pathToFile = "c:\file.txt"
On Error Resume Next
fileAvail = FileLen(pathToFile)
If fileAvail = 0 Then
MsgBox "File not Available"
'File Not available, do nothing
Else
MsgBox "File Available!"...
Try the following. I use this method quite often in work projects (can be placed in button action or any other sub):
Dim pathToFile As String
Dim fileAvail As Variant
'Open check file
'Change to local or network location
pathToFile = "c:\file.txt"
On Error Resume Next
fileAvail =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.