View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mark Mark is offline
external usenet poster
 
Posts: 989
Default Help with Recursive Call?

I agree, I need a lot of practice in learning to write efficient, eloquent
recursive calls.

1. you have an On Error resume Next but nowhere do you actually check
for error values and handle them.


Not really true. The entire poitn of that On Error was so that the code
wouldn't bomb when it tried to create a directory that it wasn't yet ready
for... too far down the tree.

2. You have no end to the recursiveness it should end when you run out
of directories to create.


Again, not correct. It does run out when the directories are created. If
it didn't, I'd now be getting infinite calls, whereas it is now creating the
proper number of directories, and exiting... (albeit not in the best manner,
were I more experienced with recursive calls, which I was the first to admit
that I'm not).

3. Just glancing at the manipulation of stFolder it seems like a mess
(I reserve the right to review this statement in the cold light of
day). Do you use debugging : stepping through, testing values of
variables etc



Thank you for your criticism.

However, 'constructive' criticism, which usually includes specific
suggestions, not only statement proven to be incorrect, is usually more
useful.


4. if you are determined to write it recursively then get it working
non-recursively first.


I may also do that.