LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Help with optimising code

Hi all,

I am using Ron de Bruin's code to extract cell values from workbooks via
ADO. It works perfectly apart from the fact that because I need to extract
several single, non-contigious cells, I need to call the GetData function 6
times for each work book. Is there any way to combine these 6 statements
into 1 or at least reduce them?

Any help would be appreciated.

FD


Call GetData(fname, SheetName, "A10:A10",
Sheets("Invoice Listing").Cells(eRow, 1), False)
Call GetData(fname, SheetName, "I11:I11",
Sheets("Invoice Listing").Cells(eRow, 2), False)
Call GetData(fname, SheetName, "I12:I12",
Sheets("Invoice Listing").Cells(eRow, 3), False)
Call GetData(fname, SheetName, "I13:I13",
Sheets("Invoice Listing").Cells(eRow, 4), False)
Call GetData(fname, SheetName, "I14:I14",
Sheets("Invoice Listing").Cells(eRow, 5), False)
Call GetData(fname, SheetName, "G65:G65",
Sheets("Invoice Listing").Cells(eRow, 6), False)


 
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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Optimising calculation time [email protected] Excel Discussion (Misc queries) 11 January 15th 09 02:59 PM
optimising column width & row height KRK New Users to Excel 2 March 12th 08 12:35 PM
Optimising portfolios with solver? Oana Excel Programming 1 August 9th 05 10:27 AM
Tips for optimising page setup .Zoom and .FitTo properties Frank_Hamersley Excel Programming 7 June 29th 04 06:08 AM


All times are GMT +1. The time now is 10:49 PM.

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

About Us

"It's about Microsoft Excel"