Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Run time 75 Error path/file access no-how to trap???

Hi Like some help where oh where to trap this error in the below code.
If USB stick is not in laptop it just comes up with debug window

Thanks Stephen

Sub SAVETOUSBSTICK()
' SAVETOUSBSTICK Macro
' Macro recorded 19/03/2007 by *
Application.DisplayAlerts = False
ChDir "d:\"
ActiveWorkbook.SaveAs Filename:="d:\April.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=True
Application.DisplayAlerts = True
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Run time 75 Error path/file access no-how to trap???

Hello pano

Sub SAVETOUSBSTICK()
' SAVETOUSBSTICK Macro
' Macro recorded 19/03/2007 by *
On Error GoTo SAVETOUSBSTICK_Error

Application.DisplayAlerts = False
ChDir "d:\"
ActiveWorkbook.SaveAs Filename:="d:\April.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=True
Application.DisplayAlerts = True

On Error GoTo 0
Exit Sub

SAVETOUSBSTICK_Error:

MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
SAVETOUSBSTICK"
End Sub

HTH
Cordially
Pascal

"pano" a écrit dans le message de news:
...
Hi Like some help where oh where to trap this error in the below code.
If USB stick is not in laptop it just comes up with debug window

Thanks Stephen

Sub SAVETOUSBSTICK()
' SAVETOUSBSTICK Macro
' Macro recorded 19/03/2007 by *
Application.DisplayAlerts = False
ChDir "d:\"
ActiveWorkbook.SaveAs Filename:="d:\April.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=True
Application.DisplayAlerts = True
End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Path/File access error Ayo Excel Discussion (Misc queries) 1 June 8th 08 08:47 PM
Path/File Access Error [email protected] Excel Programming 1 October 15th 07 05:33 PM
Path/file access error Scott Excel Programming 5 July 22nd 06 01:58 PM
Path/File access error Scott Excel Programming 0 June 8th 06 03:35 PM
Run-time error 75 Path/File access error Casey[_89_] Excel Programming 2 May 9th 06 07:20 PM


All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"