John Skolits
JSkolits at CorporateDataDesign.com
Wed Feb 26 21:29:14 CST 2003
Jim, Try a folder a few levels down and tell me if it works. Like "c:\Program Files\Microsoft Office\...." John -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Wednesday, February 26, 2003 10:21 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Simple problem. Can't use Kill Is there a Help button on the error message that might give you some insight? I thought the problem might be in the parens or maybe a space in the path but I tried both and it worked for me (killed an exe in my c:\ folder). Jim DeMarco -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John Skolits Sent: Wednesday, February 26, 2003 9:03 PM To: dba-VB at databaseadvisors.com Subject: [dba-VB] Simple problem. Can't use Kill Am I losing it? Why doesn't the Kill statement work in this code. '********* Dim strRuntimePath as string strRuntimePath ="C:\Program Files\Microsoft Office\ART\Office" If Len(Dir(strRuntimePath & "\msaccess_SR1.exe")) > 0 Then Kill (strRuntimePath & "\msaccess_SR1.exe") End If '************ The line with "Len(Dir" in it works fine. Bu when the Kill line tries to run I get an error 75 ("Path/File access error") I can easily rename the file and move it around in explorer so I know it's not being used by anything. I've used this syntax before in other VB apps with no problem. If I rename the file through explorer and run that line again it says Error 53 :File Not Found". Which makes perfect sense. Is it because it's an EXE file? Am I missing something really obvious? John Skolits **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com