
To GetObject or Not to GetObject
Assuming it takes you two hours to make the change, that's 120 minutes you
need to recover. If the current method takes only one minute, there's no a
huge scope for saving, but be optimistic -- you'll maybe save 15 seconds per
run following this 'upgrade'. So if you are expecting to run this code more
than 480 times, the answer is yes.
One advantage of pulling the data directly from Excel would be that you can
adapt more quickly when the format of the data in the mainframe changes. Is
that likely? (In my experience, inevitable...)
Quote:
> My question is about whether GetObject will improve my current Word
> Macro.
> OK long setup story.
> I compile data from a mainframe terminal into a ASCII file that I then
> import into Excel. I perform the Subtotals on the whole range. This
> gives my the 50 totals in three columns that I'm after.
> From the Word doc/macro, I simply load the Excel sheet, which Word
> happily converts to a new document and table. I then search through
> the imported table looking the "### Total" label. I copy the three
> totals from the imported table and then paste those totals into my
> Word document table.
> The whole process of importing, searching, then pasting takes about 1
> minute to run.
> Would I gain anything by using the GetObject and grab the data from
> Excel?
> Thanks!
> David