Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 03-04-2020, 08:49 PM
pushpi004 pushpi004 is offline Runtime error "Remote Call Procedure Failed" Windows 10 Runtime error "Remote Call Procedure Failed" Office 2016
Novice
Runtime error "Remote Call Procedure Failed"
 
Join Date: Feb 2020
Posts: 21
pushpi004 is on a distinguished road
Default Remote Call procedure failed

Hi Paul. i ll share the entire code with requisite details below.

Code:
Application.ScreenUpdating = False

Dim xlApp As Object, xlWkBk As Object, StrWkBkNm As String, StrWkSht As String
Dim iDataRow As Long, i As Long

Dim xlFList As String, xlRList As String
StrWkBkNm = "C:\abvnsoftware\database\abvndatabase.xlsx"
StrWkSht = "abvnlistwithspaceshyphenontop"

 'code to create F/R list of two columns

  Set xlWkBk = .Workbooks.Open(FileName:=StrWkBkNm, ReadOnly:=True, AddToMru:=False)
  If xlWkBk Is Nothing Then
    MsgBox "Cannot open:" & vbCr & StrWkBkNm, vbExclamation
    .Quit: Set xlApp = Nothing: Exit Sub
  End If
  ' Process the workbook.
  With xlWkBk
     'Ensure the worksheet exists
    If SheetExists(xlWkBk, StrWkSht) = True Then
      With .WorkSheets(StrWkSht)
        ' Find the last-used row in column A.
        iDataRow = .Cells(.Rows.Count, 1).End(-4162).Row ' -4162 = xlUp
        ' Capture the F/R data from the last three rows of the database.
        For i = (iDataRow - 2) To iDataRow
         If Trim(.Range("A" & i)) <> vbNullString Then
            xlFList = xlFList & "|" & Trim(.Range("A" & i))
            xlRList = xlRList & "|" & Trim(.Range("B" & i))
         End If
        Next
      End With
    Else
      MsgBox "Cannot find the designated worksheet: " & StrWkSht, vbExclamation
      Exit Sub
    End If
  .Close False
  End With
End With

' Release Excel object memory
Set xlWkBk = Nothing: Set xlApp = Nothing
'Exit if there are no data
If xlFList = "" Then Exit Sub

I have kept path same on both the systems and workbook exists on same location on both the system.

Last edited by macropod; 03-04-2020 at 08:51 PM. Reason: Added code tags
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Floating" Text (Don't know what else to call it) shawn.low@cox.net Word 0 05-31-2019 09:59 AM
Runtime error &quot;Remote Call Procedure Failed&quot; How to call up "Recovered Files" on demand slavrenz Office 7 10-16-2015 05:57 PM
Error: "Changes made were lost...reconnect with server", when switching "from" field randhurrle Outlook 2 02-25-2015 06:51 PM
Runtime error &quot;Remote Call Procedure Failed&quot; Execution error 2147023170 - Failure call of distant procedure - POWERPOINT 2013 fidecourt PowerPoint 2 02-26-2013 10:25 AM
Microsoft Office 2010 programs display error message "Application has failed to start SamSR Office 1 02-15-2011 07:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:05 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft