Movefile "Permission Denied"

G

Gordon Gecko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top