Advice on With-End With

K

kirkm

Hi,

I'm reading 11 columns in several hundred rows, processing them and
writing them back to a different sheet.

At the moment each value is assigned to a variant and after finishing
each row, they're sent to a function and and written to the other
sheet.

This lets me use one 'With' clause in the main routine and one
in the function.

I could write each one as it's done though, and wouldn't need to
assign a variant, nor call a function. Instead I'd need a pile of
nested 'With' loops.

Which way is best, please ? Or is it insignificant?

Thanks - Kirk
 
T

Tim Williams

It's not clear what your current code looks like, or why an alternative
might require lots of nested for loops, so it's difficult to suggest which
approach is "best".

Best performance or best maintainability ? If the run time is not noticably
different then maintainability should trump.

Tim
 
K

kirkm

On Sat, 16 May 2009 16:02:26 +1200, kirkm wrote:

Thanks guys.... I couldn't impose my code on anyone though!
As well as bad it's extremely complex!

I'll leave it as is... it's fast enough and does what's required :)

Cheers - Kirk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top