Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default runtime err 76 on some laptops

on some laptops the following fails with a 76 run time eror on the copyfolder
line

Set FsO = CreateObject("Scripting.FileSystemObject")
sourceFolder = "CMA_Camera_Pictures"
destFolder = "C:\CRISNET\EXPORT\CMA_Camera_Pictures"
FsO.CopyFolder sourceFolder, destFolder, True

in all cases, C:\CRISNET\EXPORT already exists. Anyone have any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default runtime err 76 on some laptops


Marvin, are you certain the source folder "CMA_Camera_Pictures" always exists?


"Marvin" wrote:

on some laptops the following fails with a 76 run time eror on the copyfolder
line

Set FsO = CreateObject("Scripting.FileSystemObject")
sourceFolder = "CMA_Camera_Pictures"
destFolder = "C:\CRISNET\EXPORT\CMA_Camera_Pictures"
FsO.CopyFolder sourceFolder, destFolder, True

in all cases, C:\CRISNET\EXPORT already exists. Anyone have any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default runtime err 76 on some laptops

Yes it always exists. What I discovered is that this error occurs when the
user has autorun turned off and then tries to run the installation
spreadsheet manually. Since I did not know the path of the CD/DVD drive spec
on everyone's machine I left it out of the path name. Apparently when the
installation spreadsheet is not run from the autorun file, the copyfolder
command fails. I am not sure why this happens since the default drive is
selected by the user to get to the installation program so I would think that
this would not be a problem.

"Bill Pfister" wrote:


Marvin, are you certain the source folder "CMA_Camera_Pictures" always exists?


"Marvin" wrote:

on some laptops the following fails with a 76 run time eror on the copyfolder
line

Set FsO = CreateObject("Scripting.FileSystemObject")
sourceFolder = "CMA_Camera_Pictures"
destFolder = "C:\CRISNET\EXPORT\CMA_Camera_Pictures"
FsO.CopyFolder sourceFolder, destFolder, True

in all cases, C:\CRISNET\EXPORT already exists. Anyone have any ideas?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default runtime err 76 on some laptops

Unfortunately, I don't know all the implications of autorunning, but you
should be able to determine the absolute path by writing some detective
routines that leverage other aspects of the FileSystemObject object.

GetAbsolutePathName on the source folder should allow you to catch the error
immediately. You can then use the Drives and DriveType properties to narrow
the list of CD drives (if the machines are all undocked laptops, the
probability of multiple cd/dvd drives is reasonably low). If they are docked
(which is something you can programmatically confirm), then you can search
for drives with media present. Once the drives are determined (if you're
lucky, there is only one), you can search the drives for specific media/files.


"Marvin" wrote:

Yes it always exists. What I discovered is that this error occurs when the
user has autorun turned off and then tries to run the installation
spreadsheet manually. Since I did not know the path of the CD/DVD drive spec
on everyone's machine I left it out of the path name. Apparently when the
installation spreadsheet is not run from the autorun file, the copyfolder
command fails. I am not sure why this happens since the default drive is
selected by the user to get to the installation program so I would think that
this would not be a problem.

"Bill Pfister" wrote:


Marvin, are you certain the source folder "CMA_Camera_Pictures" always exists?


"Marvin" wrote:

on some laptops the following fails with a 76 run time eror on the copyfolder
line

Set FsO = CreateObject("Scripting.FileSystemObject")
sourceFolder = "CMA_Camera_Pictures"
destFolder = "C:\CRISNET\EXPORT\CMA_Camera_Pictures"
FsO.CopyFolder sourceFolder, destFolder, True

in all cases, C:\CRISNET\EXPORT already exists. Anyone have any ideas?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime Sundowner Excel Discussion (Misc queries) 0 February 27th 10 01:31 AM
Link 2 laptops to 1 spreadsheet with immediate updates old coach Links and Linking in Excel 1 February 10th 08 02:16 PM
Runtime 429 JeffMelton Excel Programming 1 July 23rd 06 08:48 PM
treeview and laptops JD Excel Programming 2 November 9th 04 12:18 AM
Runtime Error 424 bforster1[_3_] Excel Programming 1 July 14th 04 09:43 PM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"