I am receiving a runtime error '5' Invalid Procedure Call or Argument at the 
beginning of a script.  

It happens very sporadically (like once a week) on a script that runs twice per 
hour. 

It appears to happen before I attempt to open Meditech which means it has to 
happen in one of the following two steps: 

 

Open UPD: 
D.Open_ "\\filename and path\BostonSoftware\ftpscript.xls", ftExcel

 

BUILD_NAMES: 

 

F("PAYORREC") = "PAYORREC!" & Format(D("Date"), "yyyymmdd") & Format(Now(), 
"hhmm")

F("PATDEMO") = "PATDEMO!" & Format(D("Date"), "yyyymmdd") & Format(Now(), 
"hhmm")

F("PDATE") = "PDATE!" & Format(D("Date"), "yyyymmdd") & Format(Now(), "hhmm")

F("COMPLETE") = Format(D("Date"), "yyyymmdd") & Format(Now(), "hhmm")

F("NPRDATE") = Format(D("Date"), "mmddyy")

 

D.Close_

 

 

Does anyone have any ideas on how I can build my error trap to close the error 
5 dialog and restart the script? 

 

 

Currently I have my error handler set up as indicated below; however, since I 
don't do a tremendous amount of work with error handlers I am not sure if this 
will work (and being unable to reproduce the error makes it even more fun): 

Sub MyError 

Select Case Err.Number

  

    Case 5

    Err.Clear

    Wait 2

    Resume

    

    Exit Sub

 

    Case Else

    Wait 5

    Err.Clear

    Shutdown = True

    Wait 5

    

    End Select

Exit Sub

 

Thanks in advance. 

 

Kimberly Scaccia, System Admin 

Recovery Reimbursement

Patient Business & Financial Svcs

Halifax Medical Center

386-226-4590 optn 1, ext 2018

 

Electronic communications originating from or sent to Halifax Community Health 
System (HCHS) are subject to monitoring and public inspection under ยง 119.07, 
Florida Statutes.  This message and any attachments are the property of HCHS 
and are intended to be received only by the individuals or entities identified 
in the message.  If you have received this message in error, please take 
notice: 1) that any use, copying, printing, forwarding or distribution of this 
message in any form is strictly prohibited, and 2) please notify the HCHS 
Compliance Department at (386) 254-4278 and/or forward the message to [EMAIL 
PROTECTED], and please delete or destroy all copies of the message and any 
attachments.

 

Reply via email to