FromFile = App.Path & "\ocx\" & "actskin4.ocx"
ToFile = GetSysDir'获得系统目录函数
'MsgBox ToFile
If dir(FromFile) <> "" And dir(ToFile, vbDirectory) <> "" Then
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile FromFile, ToFile, True'这里提示 拒绝权限
Set fs = Nothing
End If
如果换成其他普通目录,程序就没有问题了!怎么解决这个问题,谢谢
ToFile = GetSysDir'获得系统目录函数
'MsgBox ToFile
If dir(FromFile) <> "" And dir(ToFile, vbDirectory) <> "" Then
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile FromFile, ToFile, True'这里提示 拒绝权限
Set fs = Nothing
End If
如果换成其他普通目录,程序就没有问题了!怎么解决这个问题,谢谢
fs.CopyFile FromFile, Tofile & "\actskin4.ocx" , True