469,568 Members | 1,570 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,568 developers. It's quick & easy.

when i use this code to copy a text file and paste it in a specific path:this error a

when i use this code to copy a text file and paste it in a specific path:
Dim fso As New FileSystemObject
fso.CopyFile "C:\Files\file.txt", "C:\Files1\file_copy.txt"


this error appear

compile error
user-defined type not defined

is there a specific reference must be defined?
Feb 28 '08 #1
2 1121
VBWheaties
145 100+
Try

Expand|Select|Wrap|Line Numbers
  1. Dim fso
  2. Set fso = CreateObject("Scripting.FileSystemObject")
  3.  
Feb 28 '08 #2
Killer42
8,435 Expert 8TB
ahmed222too, please don't start a new thread when continuing the same discussion. I've closed this one. Please post anything further about this in your original thread.
Feb 29 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Nand Belani | last post: by
9 posts views Thread by =?Utf-8?B?cm9kY2hhcg==?= | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.