473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1220
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: AndyMc | last post by:
The MCSD .NET certification tests users on building Web-based, distributed, and commerce applications by using Microsoft products, such as Microsoft SQL Server, Microsoft Visual Studio .NET, and...
17
by: Paul | last post by:
HI! I get an error with this code. <SCRIPT language="JavaScript"> If (ifp==""){ ifp="default.htm"} //--></SCRIPT> Basicly I want my iframe to have a default page if the user enters in...
3
by: Daniel | last post by:
if System.IO.StreamWriter write throws an exception, is there anyway to close the System.IO.StreamWriter object? it seems to stay open when this happens then future attempts to write to that same...
1
by: Nand Belani | last post by:
Hi, I have a MS Access 2000 database on the network, it is secured and the mdw file is on the network. The database works for most of the users on the network, but does not open for two of the...
2
by: Tommy Vercetti | last post by:
I am working on a Managed C++ project and I get the following error: TestThread.cpp(3) : error C2859: c:\projects\ProjectName\debug\vc70.pdb is not the pdb file that was used when this...
4
by: mimi | last post by:
Hi Please help me out, I can't find a way to close a sqldatareader when error occur at statement cmd.ExecuteReader(). I can't close it in catch because it is local in try scope and I can't...
1
by: TSalm | last post by:
Hi, After sending a request, I would get the possible error message. Not the code @@error, nor the exact content of sysmessages, but the message like it could be in the log file. TIA, TSalm
13
by: problem. | last post by:
#include <stdio.h> #include <stdlib.h> int main(void) { int a, b; float result = 0.0f; char symbol = '\0'; int loop = 0;
0
by: Zuhaib Hyder | last post by:
i'm trying to configurer my dot net site on lcal IIS, which use ms access database while i try to access from other pc's, then database path error occurs, bcz my connection was trying to find...
9
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, please reference: http://pastebin.com/mef78b3d As shown in the reference I am dynamically building my controls in my class. I'd like to be able to attach javascript calls as...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.