PC Review


Reply
Thread Tools Rate Thread

Code failure with different partitions

 
 
Otto Moehrbach
Guest
Posts: n/a
 
      1st Feb 2008
Excel XP & 2003, Win XP
I'm helping an OP with some code and I have run into a problem that I have
not seen before. The code involves a FOR loop through all the files in a
sub folder to the ThisWorkbook.Path folder. The path line of code looks
like:
ThePath=ThisWorkbook.Path & "\OtherFolder"
The code works just fine on my computer and fine on his computer except when
partitions come into play.
I have just 1 partition on my hard drive. He has C, D, E, F.
All of his programs, including Excel, are on the D partition. All of his
files, including ThisWorkbook and "OtherFolder" are on the C partition.
The code will not work correctly on his computer every time. Sometimes the
code cannot find a file, other times it can. I don't see any difference in
his operation than mine except for the partitions.
Question: Does anyone know of problems with having a setup like his?
Thanks for your time. Otto


 
Reply With Quote
 
 
 
 
ilia
Guest
Posts: n/a
 
      2nd Feb 2008
I never had this sort of issue, and I've done all kinds of operations
with network paths, mapped drives, partitions, etc. What kind of
operation is he doing to search for the files? Is it FileSearch, Dir,
or what? Also, is it possible that ThisWorkbook exists in two copies,
and one of them isn't in the right place?

On Feb 1, 4:39*pm, "Otto Moehrbach" <ottokm...@comcast.net> wrote:
> Excel XP & 2003, Win XP
> I'm helping an OP with some code and I have run into a problem that I have
> not seen before. *The code involves a FOR loop through all the files in a
> sub folder to the ThisWorkbook.Path folder. *The path line of code looks
> like:
> ThePath=ThisWorkbook.Path & "\OtherFolder"
> The code works just fine on my computer and fine on his computer except when
> partitions come into play.
> I have just 1 partition on my hard drive. *He has C, D, E, F.
> All of his programs, including Excel, are on the D partition. *All of his
> files, including ThisWorkbook and "OtherFolder" are on the C partition.
> The code will not work correctly on his computer every time. *Sometimes the
> code cannot find a file, other times it can. *I don't see any differencein
> his operation than mine except for the partitions.
> Question: *Does anyone know of problems with having a setup like his?
> Thanks for your time. *Otto


 
Reply With Quote
 
Otto Moehrbach
Guest
Posts: n/a
 
      2nd Feb 2008
It is a simple loop through all the files in the folder. The code is using
Dir to pick up each file. Thanks. Otto
"ilia" <(E-Mail Removed)> wrote in message
news:8d40054c-1e86-4764-aba2-(E-Mail Removed)...
I never had this sort of issue, and I've done all kinds of operations
with network paths, mapped drives, partitions, etc. What kind of
operation is he doing to search for the files? Is it FileSearch, Dir,
or what? Also, is it possible that ThisWorkbook exists in two copies,
and one of them isn't in the right place?

On Feb 1, 4:39 pm, "Otto Moehrbach" <ottokm...@comcast.net> wrote:
> Excel XP & 2003, Win XP
> I'm helping an OP with some code and I have run into a problem that I have
> not seen before. The code involves a FOR loop through all the files in a
> sub folder to the ThisWorkbook.Path folder. The path line of code looks
> like:
> ThePath=ThisWorkbook.Path & "\OtherFolder"
> The code works just fine on my computer and fine on his computer except
> when
> partitions come into play.
> I have just 1 partition on my hard drive. He has C, D, E, F.
> All of his programs, including Excel, are on the D partition. All of his
> files, including ThisWorkbook and "OtherFolder" are on the C partition.
> The code will not work correctly on his computer every time. Sometimes the
> code cannot find a file, other times it can. I don't see any difference in
> his operation than mine except for the partitions.
> Question: Does anyone know of problems with having a setup like his?
> Thanks for your time. Otto



 
Reply With Quote
 
JLatham
Guest
Posts: n/a
 
      2nd Feb 2008
I think the big clue in your post is

"The code will not work correctly on his computer every time. Sometimes the
code cannot find a file, other times it can."

Since the code presumably does the same thing each time, then something else
somewhere must be causing the intermittent faults.

I mean if on Monday the code can find F:\MyFolder\OtherFolder\SomeFile.abc
but it cannot find that same file on Tuesday (and it hasn't been moved,
deleted or renamed) then there's something wrong with either the file system
or the OS. At least that's where I'd start looking. Although it could
'just' be a hardware issue with the drive itself.

"Otto Moehrbach" wrote:

> Excel XP & 2003, Win XP
> I'm helping an OP with some code and I have run into a problem that I have
> not seen before. The code involves a FOR loop through all the files in a
> sub folder to the ThisWorkbook.Path folder. The path line of code looks
> like:
> ThePath=ThisWorkbook.Path & "\OtherFolder"
> The code works just fine on my computer and fine on his computer except when
> partitions come into play.
> I have just 1 partition on my hard drive. He has C, D, E, F.
> All of his programs, including Excel, are on the D partition. All of his
> files, including ThisWorkbook and "OtherFolder" are on the C partition.
> The code will not work correctly on his computer every time. Sometimes the
> code cannot find a file, other times it can. I don't see any difference in
> his operation than mine except for the partitions.
> Question: Does anyone know of problems with having a setup like his?
> Thanks for your time. Otto
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup drive letter sequence: Primary partitions, logical partitions, tehn DVD drives? Frank Callone Windows XP Help 4 24th Apr 2009 02:37 PM
How to setup drive letter sequence: Primary partitions, logical partitions, tehn DVD drives? Frank Callone Windows XP General 0 23rd Apr 2009 11:09 AM
Messed with my Partitions - bad PBR, hard-disk read failure stas007@vp.pl Windows XP Hardware 5 30th Mar 2006 06:02 PM
Messed with my Partitions - bad PBR, hard-disk read failure stas007@vp.pl Windows XP Help 4 30th Mar 2006 06:02 PM
P4C800-E Deluxe & Multipule W2K OS partitions, problems installing to 2nd & 3rd partitions? Tim Asus Motherboards 5 31st Oct 2005 06:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:01 PM.