Import Excel ranges - clarify

K

Ken Snell MVP

Feasible, yes. You'd have to use Automation to read the EXCEL files and
decide whether to import a range.

Probably more effective if you import the ranges, including the "criterion"
cell, and let your queries decide whether to use / not use the data.

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


MikeF said:
Jim or Ken,

Now that this works, am wondering ...

Re the range to import --- is there any method of setting up criteria in
the
Excel fields and importing only the records that meet that criteria?

Example -- all 7 ranges are imported, from a hundred workbooks.
As there are a few of them that will "suffer" some adjustments as time
goes
by, would like to put "adj" or something of that nature in a field/column
of
a record that contains an adjustment, so as not to re-import the entire 7
ranges.
Only the new recoreds.
*** I could set up another routine that imported only the records in each
range with "adj" in one field.

Before I head down this path, is this feasible???

Thanx and regards,
- Mike


JimBurke via AccessMonster.com said:
Here's a link to the 'built-in' Access method:

http://support.microsoft.com/kb/279508

I'm sure this is more or less the same as the one you would have used in
Excel - it's a standard Microsoft Office tool.
Jim, no problem.
Thank you!!
I've stored both your modules.
And yes, Ken's works now, after I took the quotations off strFilePath as
per
your suggestion.

And "my" code, ie the multiple TransferSpreadsheet lines, all work as
well.
It's a bit of a nail-biter when it's running, as there is nothing to
display
progress, but ... it certainly works.

Have to say though, it just seems like *A LOT* of complex code to merely
open a "which file?" dialog box.
Especially after the easy one or two lines in Excel vba.

One picky thing [asking for the world here!!] --- the Getz code is
rather
old, before the dialog boxes had "Places" on the left, as in an easy way
to
get to your much-used items.
... Is there anyway of changing the old dialog box that comes up to the
new
2007-style one that sports "Places" in the left pane???

Regards,
- Mike

Well, I messed up. I should have just let Ken handle this and not
replied. I
assumed he was talking about the same Getz code that I have, but now
that
[quoted text clipped - 27 lines]

End Function
 

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