Results 1 to 3 of 3

Run-time error '438' Object doesn't support this property or method

Threaded View

  1. #1
    Registered User
    Join Date
    05-05-2017
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2016
    Posts
    2

    Run-time error '438' Object doesn't support this property or method

    Hello!

    First of all thanks to all of you who come here to answer questions, I (and I'm sure many of us) appreciate what you all do.

    That being said, I've become stumped on a problem and after searching the internet for a while I still haven't been able to figure it out. I have a macro that I've written that deals with mainframe. The goal of the snippet of code we're looking for help with today is to have the mainframe FTP a generic file from mainframe to the PC. To do so we have excel open mainframe as an object in its own function (Far earlier in the same macro, as there are many other things we have this macro do than ftp the file) and simply send the object whenever we call a new sub that needs ran. This works successfully for other subs in the same macro. When we get to this sub however we have a problem. In the below code, we get a Run-time error '438': Object doesn't support this property or method for line ss.navigateto "ftpmacro.zmc".

    Rather than calling a new macro as shown in the longer section of code below, we also attempted to have the code run a toolbar command which also received the same error. The command we attempted to send was
    ss.ReceiveFile ("GenericSharedFolderLocation MainframeFileName ASCII CRLF")
    GenericSharedFolderLocation being the place we intend to initially send the file, the MainframeFileName is the output file inside mainframe we want to ftp over. If we do this as it's own macro in the proper screen on mainframe (macro through a notepad and the run macro functionality on the mainframe emulator) it works successfully. When we try to have excel run this same code through the object we get the same error (ss.ReceiveFile...)

    Does anyone know why this error keeps occurring here, and if so how to fix it? Or alternatively does anyone know how to force a mainframe object to ftp a file from mainframe to pc through excel?

    Thank you all for your time.

    Call ConnectToPassport(ss)
    Call SendFile(userID, Filekey, ss)
    
    Sub SendFile(userID, Filekey, ss)
    Dim FSO
    Dim sFile As String
    Dim Text
    Dim Ret
    
    sFile = "GenericSharedFolderLocation" & Filekey
    
    Set FSO = CreateObject("Scripting.FileSystemObject")
    
    If FSO.FileExists(sFile) Then
        FSO.DeleteFile sFile, True
    End If
    
    ss.navigateto "ftpmacro.zmc"
    
    MyTargetFolder = "C:\PersonalFolderLocation" & Filekey
    Name "GenericSharedFolderLocation" As MyTargetFolder
    Kill ("GenericSharedFolderLocation")
    
    End Sub
    
    Function ConnectToPassport(ss)
    
        Set System = CreateObject("PASSPORT.System")
        If System Is Nothing Then
            Exit Function
        End If
        Set Sessions = System.Sessions
        If Sessions Is Nothing Then
            Exit Function
        End If
        Set sess0 = System.ActiveSession
        If sess0 Is Nothing Then
            Exit Function
        End If
        If Not sess0.Visible Then sess0.Visible = True
        Set ss = sess0.Screen
        
    End Function
    Last edited by AFaolan; 05-08-2017 at 02:25 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Getting run-time error 438 object doesn't support this property or method
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-18-2016, 06:24 AM
  2. [SOLVED] Getting run-time error 438 object doesn't support this property or method
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-27-2016, 12:59 AM
  3. Run-time error '438': Object doesn't support this property or method
    By s3a in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 11-15-2012, 11:25 AM
  4. Run-time error '438': Object doesn't support this property or method
    By ThaGreenMoose in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-04-2011, 01:17 PM
  5. Run-time error '438' Object doesn't support this property or method
    By Lothar69 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2011, 03:30 PM
  6. Run-Time Error '438' - Object doesn't support this property or method
    By rajibyumnam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2011, 03:24 AM
  7. Run-time error '438': Object doesn't support this property or method
    By ophelia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2007, 05:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1