View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alvin Hansen[_2_] Alvin Hansen[_2_] is offline
external usenet poster
 
Posts: 209
Default Please help me with this error

Hi!!
I have a macro he
Sub copy()
'
' copy Makro
' Makro indspillet 07-09-2004 af Alvin Hansen
'


Dim FSO As Object
Dim FromPath As String
Dim ToPath As String


FromPath = "h:\city breaks"
ToPath = "C:\city breaks"

Set FSO = CreateObject("scripting.filesystemobject")

If FSO.FolderExists(FromPath) = False Then
MsgBox "From Folder doesn't exist"
Exit Sub
End If

If FSO.FolderExists(ToPath) = False Then
MsgBox "To Folder doesn't exist"
Exit Sub
End If
FSO.CopyFolder Source:=FromPath, Destination:=ToPath

End Sub

I have no trouble with thid before to day
now i get a persmission dennied error why ??
I dont belive i have change anything on my pc??

Best regards
Alvin