Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default Advice on With-End With

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Advice on With-End With

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

<kirkm wrote in message ...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default Advice on With-End With

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
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
Advice Please? Greg[_27_] Excel Programming 3 May 9th 06 10:51 AM
Help, need advice Mikeyhend[_2_] Excel Programming 3 April 16th 06 03:19 PM
need advice Sergo Excel Programming 1 February 5th 06 12:52 AM
RTD Advice JD Excel Programming 2 October 22nd 04 11:29 AM
please advice Waleed Hanafy Excel Programming 1 April 15th 04 02:50 PM


All times are GMT +1. The time now is 07:20 PM.

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"