Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Movefile "Permission Denied"

To all the generous ladies and gentleman of this fantastic group,

Here is the code and the error is "Permission Denied". This is moving
files that were previously scanned in. Any help at all is appreciated.

Line = Range("C7").Value
Office = Range("D7").Value
Cust = Range("E7").Value
Contact = Range("F7").Value
QuoteNum = Range("G7").Value
JobName = Range("H7").Value
PONum = Range("I7").Value
Commission = Range("O7").Value

QuoteDir = QuoteNum & " - " & Cust & " - " & Contact & " - " &
JobName
OrderDir = PONum & " - " & Cust & " - " & Contact & " - " & JobName

'Move CPO into order directory
Set fs = CreateObject("Scripting.FileSystemObject")
CurrPOScanFile = "C:\Ricoh Scan Files\CPO_" & Cust & "_" & PONum &
".pdf"

If Dir(CurrPOScanFile) < "" Then 'to avoid errors in blank po
fs.MoveFile CurrPOScanFile, "X:\Orders 2004\" & Cust & "\" &
OrderDir
MsgBox "Your CPO has been filed in directory: X:\Orders 2004\" &
Cust & "\" & OrderDir
End If

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
"access denied" message when open Excel, MS 2007 piciu Excel Discussion (Misc queries) 1 February 12th 09 01:32 AM
Run-Time error "70" Permission Denied Audrey Excel Programming 12 February 4th 05 10:07 PM
Excell files showing "Read Only" access denied Scott L Excel Programming 1 November 30th 04 12:27 AM
Error "Permission denied" when printing Web Browser control from button on userform, Charles Jordan Excel Programming 0 July 8th 04 04:19 PM
"Programmatic Access to be Denied" displays when running macro on excel in XP Stephen Fong Excel Programming 3 October 21st 03 09:19 AM


All times are GMT +1. The time now is 06:10 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"